thanks for your reply. So it's actually as I initially thought. Problem is 
this weird behavior described above which is very worrisome on the live 
system. I already had like a million entries in the scheduler_run table 
after a failed task. Usually I can catch those errors fast after I get 
informed by the Monitoring system but in case I cannot react immediately 
(e.g. during vacation) this could become a real problem for the live system.

I think for now I'll set retry_failed to 0 to avoid such scenarios. In case 
the task fails I'll have to fix some error anyway and update the 
db/application. So it's probably not a big deal if the task is not executed 
again automatically.

But of course it would be good to know what's going on here and why this 
can happen.

Alex

On Monday, February 1, 2016 at 9:35:56 PM UTC+1, Niphlod wrote:
>
> if the task fails, period is honored nonetheless, so what you're 
> experiencing is extremely weird.
> a task queued with period=86400, repeats=0 and retry_failed=-1 will be 
> executed with no less than an 86400 seconds interval whether it fails or it 
> completes.
>
> On Saturday, January 30, 2016 at 8:44:52 PM UTC+1, Alex wrote:
>>
>> how does the correct setup for a daily scheduler task look like?
>>
>> currently I'm using an entry in scheduler_task with repeats 0 (unlimited) 
>> and retry_failed -1 (unlimited). If the task runs without errors everything 
>> is fine and the task is executed once a day. But if the task fails (e.g. 
>> runtime error or an exception) then the task is repeated all the time and I 
>> have many entries in the scheduler_run table after a short time. Strangely 
>> this doesn't happen all the time, sometimes the task is only executed once 
>> and then again on the next day.
>>
>> Now I tried using retry_failed 0 to avoid those problems. In this case 
>> the failed task is only executed once but will not be executed again on the 
>> next day.
>>
>> Is it possible to create a task which is executed only once every day?
>>
>> Alex
>>
>>

-- 
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/d/optout.

Reply via email to