Hi again,
Thanks for the tips! What I ended up doing is creating a model file 
containing the following:

import datetime 
if db(db.scheduler_task).isempty():      
        
db.scheduler_task.update_or_insert(db.scheduler_task.task_name=='my_function',
                application_name='my_app',
                task_name='my_function',
                function_name='my_function',
                repeats =  0, 
                period = 5,
                retry_failed = -1
    )
    db.commit()

There is perhaps a less verbose way to do it, I didn't check which fields 
have defaults. I tried the same thing using the *queue_task *function but 
it seemed to cause multiple tasks to appear again,* update_or_insert*solved 
that problem.

-- 



Reply via email to