0

I'm setting up a tornado server. While this server is running i would like to make multiple asynchronous calls with an interval of 5 min. so when the server is running it should run a function every 5 min. I'm wondering what the best solution for this is? should i use something like apscheduler or can it be done natively using tornado?

Peter Pik
  • 11,023
  • 19
  • 84
  • 142
  • 1
    Cron could be an option? For example: https://stackoverflow.com/questions/8727935/execute-python-script-on-crontab – floatingpurr Apr 13 '18 at 11:19

1 Answers1

0

It can be done natively with PeriodicCallback:

Schedules the given callback to be called periodically.

The callback is called every callback_time milliseconds. Note that the timeout is given in milliseconds, while most other time-related functions in Tornado use seconds.

You can read about it in the docs.

Community
  • 1
  • 1
Ivan Vinogradov
  • 4,269
  • 6
  • 29
  • 39