0

I’m looking to implement a script that calls a web API at regular intervals (e.g. every hour). I’m using Flask as my server.

Should I use the Cron framework, or is it better to use Python’s schedule function to run the script?

3

Cron, otherwise you'll need something extra to make sure your python script is always running. Of course, this counts for cron too.

  • How would one initiate a scheduled task with Cron, other than manually starting the Cron schedule from the command line? – charliesneath May 23 '18 at 15:17
  • That's the init systems job, good old sysvinit or bad new systemd. – Gerard H. Pille May 23 '18 at 20:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.