Thank you for the replies - this is helpful. On #3 I simply meant the monthly # of seconds changes from month to month (for the repetition of the task). I get what you are saying, however.
On Saturday, April 26, 2014 1:08:50 PM UTC-6, Niphlod wrote: > > 1. When a task goes into TIMEOUT, it needs to be carefully reviewed. > TIMEOUT means that something that you needed isn't there... your case seems > to contemplate a missing run, but if it's so, you need to manage the > "absence" in your code (i.e. it must be eventually "planned"). To > summarize, a TIMEOUT task is something that you DIDN'T plan to go on > timeout....if instead you are cool with that, you should manage it into the > task itself, e.g. raising an error if n seconds are passed (so the task > gets into the FAILED status) > > 2. if you modify directly the scheduler_task table, pretty much ALL fields > are important, because every one of them specifies how, when, etc a task > needs to run > > 3. if you need it monthly, why the need for "number of seconds" to be > variable ? In any case you'd better off queuing something that gets fired > every once in a while and schedules the task only when it's needed > > > > On Friday, April 25, 2014 7:00:18 PM UTC+2, David Rager wrote: >> >> I'm just a tad confused about the scheduler - just 3 items I haven't been >> able to figure out and handle: >> >> 1. When a scheduler_task times out I see the status of TIMEOUT. It >> appears the task will not run again for the next scheduled run. Is this >> the expected behavior or am I misinterpreting? Because I work with >> external resources that are not always reliable I expect timeouts but would >> like the task to run on the next scheduled try if possible. >> >> 2. When entering or modifying scheduler_task items is it important to >> update the Next Run Time to a future data in order for the task to run? I >> have been doing this because it seems logical. For instance - after a >> TIMEOUT when I update the task to QUEUED do I also need to modify the Next >> Run Time to get it to go again? I believe this is the behavior but wanted >> to clarify. >> >> 3. Is there a method to run a task monthly (where number of seconds is >> variable)? >> >> I'm contemplating writing a schedule manager of a sort which would: >> 1. capture the status of all the tasks (just a snap of the table) >> 2. flip the TIMEOUTs to QUEUED for me every morning so they will continue >> to run >> 3. update the Next Run Time on timed out jobs and monthly jobs on the >> flip of the month >> >> I would use a scheduler_task to do this (with the hope that task would >> not timeout or stop executing for whatever reason) - but perhaps I'm >> misinterpreting how this is working from playing with it this week. >> >> Appreciate any clarification - this is my first attempt to harden the >> scheduler for production use. >> >> TY! >> > -- 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.