Forums

how to activate task in web2py internal Scheduler?

I have created Scheduler tasks as described here: http://web2py.com/books/default/chapter/29/4#Scheduler-%28experimental%29

The process was successfully added to the queue in db.scheduler_task right after creation of the task in separated model. However it looks that processes not get activated or assigned to any workers afterwords. Mentioned link describes the activation/assigning procedure via command line command: "python web2py.py -a yourpass -K myapp -X". I wonder where this command should be executed? I have tried in bash and python console but had no luck. I will appreciate any help in this matter. Thank you in advance.

Hi Andrey,

We don't support the web2py scheduler right now (though that is likely to change in the future). You might be able to achieve what you want using our "Scheduled tasks", though.

Giles

can we use the Scheduler today?

You can use the scheduled tasks tab on PythonAnywhere to set a job to run on a regular basis, to kick off the scheduler, or restart it if it has stopped.

This stackoverflow post has an example: http://stackoverflow.com/a/20886670/366221