Thanks for the response. Other than the below script, it was mentioned in the document that scheduler workers can be started via cron@reboot The scheduler does not use cron, although one can use cron @reboot to start the worker nodes. I am just starting to work on web2py. So, sorry for ignorance. As far as I know, @reboot can be used to call any python function in the application. If so, how do i start the worker nodes in that function. The below script "python web2py.py -k myapp" cant be added there. So is there a way to start the worker nodes in a python function?? so that on every reboot i can call that function via @reboot and the worker nodes will be started automatically.
On Tuesday, 22 October 2013 23:57:27 UTC+5:30, Marin Pranjić wrote: > > You are not supposed to add entries to scheduler_worker. You need to > run scheduler in the background. > > python web2py.py -K myapp > > > Detailed explanation here: > http://web2py.com/books/default/chapter/29/04/the-core#Scheduler > > > > Marin > > On Tue, Oct 22, 2013 at 8:25 PM, ranjith <ranji...@gmail.com <javascript:>> > wrote: > > I tried changing the worker table status to active/pick and others. It > didnt > > work > > > > > > On Tuesday, 22 October 2013 23:53:24 UTC+5:30, ranjith wrote: > >> > >> Hi, > >> > >> I have a model file called scheduler.py which has > >> > >> from gluon.scheduler import Scheduler > >> def messageTask(): > >> mail.send(to=['ranji...@gmail.com <javascript:>'],subject='hello', > message='hi > >> there') > >> return > >> scheduler = Scheduler(db,tasks=dict(messageTask=messageTask)) > >> > >> I added an entry in scheduler_task table > >> Application Name: > >> Task Name: > >> Group Name: > >> Status: > >> Function Name: > >> Uuid: > >> Args: > >> Vars: > >> Enabled: > >> Start Time: > >> Next Run Time: > >> Stop Time: > >> Repeats:0=unlimited > >> Retry Failed:-1=unlimited > >> Period:seconds > >> Timeout:seconds > >> Sync Output:update output every n sec: 0=never > >> Times Run: > >> Times Failed: > >> Last Run Time: > >> Assigned Worker Name: > >> > >> > >> I have also added an entry in scheulder_worker table > >> > >> Id:1 > >> Worker Name: > >> First Heartbeat: > >> Last Heartbeat: > >> Status: > >> Is Ticker: > >> Group Names: > >> > >> + - > >> > >> Check to delete: > >> > >> > >> > >> But the the function is not getting scheduled. Am I missing something > >> here? Please help!!!! > >> > >> > >> scheduler_run.task_id > >> > >> > >> > >> > >> > >> > > -- > > Resources: > > - http://web2py.com > > - http://web2py.com/book (Documentation) > > - http://github.com/web2py/web2py (Source code) > > - https://code.google.com/p/web2py/issues/list (Report Issues) > > --- > > You received this message because you are subscribed to the Google > Groups > > "web2py-users" group. > > To unsubscribe from this group and stop receiving emails from it, send > an > > email to web2py+un...@googlegroups.com <javascript:>. > > For more options, visit https://groups.google.com/groups/opt_out. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.