On 09/30/2012 02:37 PM, Niphlod wrote: > I did not find the reference to _validate_and_insert in the book (vs > validate_and_insert without the underscore)
Just copy-paste from http://web2py.com/books/default/chapter/29/04#Scheduler-(experimental) "Anyway, one should not update records relative to RUNNING tasks as this may create an un-expected behavior. The best practice is to queue tasks using "validate_and_insert". For example: db.scheduler_task._validate_and_insert( function_name='task_add', args='[]', vars="{'a':3,'b':4}", repeats = 10, # run 10 times period = 3600, # every 1h timeout = 120, # should take less than 120 seconds ) Notice that fields "times_run", "last_run_time" and "assigned_worker_name" are not provided at schedule time but are filled automatically by the workers. You can also retrieve the output of completed tasks:" -- Vincenzo Ampolo http://vincenzo-ampolo.net http://goshawknest.wordpress.com --

