> I have entered two functions in <app>/models/scheduler.py and have added > them using: > > from gluon.scheduler import Scheduler > myscheduler = Scheduler(db,dict(nr_arts_per_journal=art_pp, publishers =pbs > )) > > This did not add anything to the table db.scheduler_task. Is that normal? > Yep. That means only that you're willing to queue a task named "nr_arts_per_journal" and that task should "launch" the art_pp function (meaning that you have a def art_pp() somewhere in your app)
> 1. The default entry in the field application_name is '<app>/appadmin'. > Why is /appadmin added? I suspect I should enter the app name there. > By default tasks are entered in an "applicationname/controller" form. This allows to execute eventual conditional models in the right way (i.e. when you queue the task from test.py controller, conditional models in models/test/ folder will be executed). You don't have to worry about this field normally because it's filled by default even when you queue tasks not using appadmin > 2. What 'repeats' mean is not clear to me. > 2.1 Does that mean 'repeat x number of times in the period' for each > period? > 2.2 What does -0 (unlimited) mean in relation to period? Does that mean: > try as many as you can within the period? Or: repeat until ended otherwise > once per period? > > I though the image on the book was pretty clear..... *repeats *means "execute this task n times". Repetitive tasks (i.e. whose *repeats *value is not 1) will repeat execution every *period *seconds. > 3. In the video, the command 'python web2py.py -K <app>' showd some info > about the runs. I have started the worker and nothing is showing but: > 'starting single-scheduler for "akb"...' > > How do I get the worker to be more verbose? > Using web2py.py -K akb -D 0 (-D 0 is "set logging level to debug") > > 4. I have the following entries in db.scheduler_task: > > scheduler_task.application_name scheduler_task.task_name > scheduler_task.function_name scheduler_task.repeats > scheduler_task.retry_failed scheduler_task.period scheduler_task.timeout > akb Number of articles per publication nr_arts_per_journal 3 -1 180 120 > akb Publishers publishers 1 0 7200 120 > > The absent fields were either NULL or the default values. Both functions > were queued and enabled. > > Although I have started the worker (python web2py.py -K akb) nothing is > happening. > Post all the fields, this is far too little to tell what's wrong. --

