I am for the first time trying to use the scheduler and so far it was 
unsuccessful :(

I have watched the video on vimeo on the scheduler and I suspect that is a 
bit old.

I have read what was written in the book as well as the docstrings in 
gluon/scheduler.py.

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?

So I used the appadmin interface to add them the functions.

Some options are not clear to me:

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.  

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?

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?

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.

How do I get the scheduler to handle those tasks?  

Are my options wrong?

Regards
Johann




-- 



Reply via email to