Let's think about this some more.... On Mar 4, 5:43 pm, Rowdy <[email protected]> wrote: > mdipierro wrote: > > ok, in trunk. Thanks for your help with this. > > > On Mar 3, 8:42 pm, Rowdy <[email protected]> wrote: > > Bad news. I left it running overnight with the 5 and 10 minute jobs and > the check for >= 59 seconds, logging the extra debug messages. > > The lowest values for the interval were (these are just the debug > messages where I log the values used in the calculation and comparison): > > DEBUG:root: self.now - start = 59.4419999123 (sb >= 59) > DEBUG:root: self.now - start = 59.7331020832 (sb >= 59) > DEBUG:root: self.now - start = 59.8089871407 (sb >= 59) > DEBUG:root: self.now - start = 59.9066801071 (sb >= 59) > DEBUG:root: self.now - start = 59.9478530884 (sb >= 59) > DEBUG:root: self.now - start = 59.9600059986 (sb >= 59) > DEBUG:root: self.now - start = 59.9605009556 (sb >= 59) > DEBUG:root: self.now - start = 59.9644701481 (sb >= 59) > DEBUG:root: self.now - start = 59.9700820446 (sb >= 59) > DEBUG:root: self.now - start = 59.9701111317 (sb >= 59) > DEBUG:root: self.now - start = 59.9742279053 (sb >= 59) > DEBUG:root: self.now - start = 59.9745769501 (sb >= 59) > DEBUG:root: self.now - start = 59.9763190746 (sb >= 59) > DEBUG:root: self.now - start = 59.9764039516 (sb >= 59) > DEBUG:root: self.now - start = 59.9764339924 (sb >= 59) > DEBUG:root: self.now - start = 59.9844388962 (sb >= 59) > DEBUG:root: self.now - start = 59.9874939919 (sb >= 59) > DEBUG:root: self.now - start = 59.9896328449 (sb >= 59) > DEBUG:root: self.now - start = 59.9899420738 (sb >= 59) > DEBUG:root: self.now - start = 59.9899940491 (sb >= 59) > DEBUG:root: self.now - start = 59.9899971485 (sb >= 59) > DEBUG:root: self.now - start = 59.9899971485 (sb >= 59) > > Testing for a delay of 59.99 seconds would mean that any cron jobs > scheduled to run on the above 22 occasions would not run as > Token.acquire() would not obtain a lock. > > To me this is significant, as the possibility exists that a once a day > job might fall on an execution time where the interval is between 59 and > 59.99 seconds (as in the above 23 seconds) and not run. When cron > starts up a minute later, the job has lost its opportunity to run, and > that day is skipped (for the once a day job). > > I have not started writing the cron jobs for my app yet (there are about > a dozen), so I will see how it goes when the jobs are in place. > > But the main problem with jobs running every minute and regularly > skipping have been solved. > > Thanx again. > > Rowdy
-- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.

