pythonscheduled-tasksweb2py

Web2py scheduler - Best practices to rerun task continuously and to add task at startup


I want to add a task to the queue at app startup, currently adding a scheduler.queue_task(...) to the main db.py file. This is not ideal as I had to define the task function in this file.

I also want the task to repeat every 2 minutes continuously.

I would like to know what is the best practices for this?


Solution

  • There is no real mechanism for this within web2py it seems.

    There are a few hacks one could do to continuously repeat tasks or schedule at startup but as far as I can see the web2py scheduler needs alot of work.

    Best option is to just abondon this web2py feature and use celery or similar for advanced usage.