Let's make it 59.99 then. We want to avoid false positives more than
false negatives.

On Mar 3, 7:08 pm, Rowdy <[email protected]> wrote:
> mdipierro wrote:
> > grrrr. as the changelog above said:
>
> > 1) major fix in cron (will I ever get this 100% right?)
>
> > Anyway, please check it in trunk.
>
> I did not get a chance to test cron changes in trunk before the 1.76.3
> release.
>
> Thank you for the speedy responses and update.
>
> I have had a look at the 1.76.3 cron, and have the following
> observations.
>
> 1. The "execute every minute" problem is fixed :-)
>
> 2. The spelling error is still there "CRON Call retruned success" should
> be "returned"
>
> 3. There is a problem with acquiring a lock.  Not a web2py problem
> particularly.  As I understand it, Token.acquire() in cron.py checks
> whether the last time cron started was more than 60 seconds ago.  If
> not, it does not try to acquire a lock, and the whole cron cycle
> silently aborts (crondance(): if not cronmaster: return) until the next
> minute.
>
> What I am seeing with a few extra debug statements is that while
> acquiring a lock and testing "self.now - start >= 60" sometimes the
> calculation is like 60.0000019073 and sometimes like 59.9999949932.
> This seems to happen fairly randomly, so occasionally, but repeatably,
> cron thinks the last execution was 59.999 seconds ago, and does not
> start up.  The next time thru the time difference is like 119.999917984
> seconds, so the next cron does start.
>
> How about changing the test for >= 60 seconds to >= 59 seconds in
> Token.acquire()?  I tried that and, although it is difficult to state
> authoritatively that it works forever, running my 5 minute and 10 minute
> cron jobs for an hour or so has reliably run each job at the scheduled
> times.
>
> 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.

Reply via email to