you are right. A similar fixed is in trunk. I also did some more cleanup in cron. Please check it.
On Mar 2, 9:36 pm, Rowdy <[email protected]> wrote: > mdipierro wrote: > > clearly something is wrong. I do not think this is due to the new cron > > mechanism introduced in 1.76.1 but I will run some checks later > > tonight. > > Aha! I have been poking around in gluon/contrib/cron.py crondance(), > and found this: > > for task in tasks: > <code snipped ...> > if not task.get('min',[])==[-1]: > for key, value in checks: > if key in task and not value in task[key]: > continue > > I think the last line (continue) is supposed to skip to the next task if > the current task has a non-matching time, but what it actually does is > skip out of the inner "for key, value in checks:" loop, and executes the > task anyway. > > I worked around it by adding a skip variable that is set to True in the > inside loop if the task should be skipped, and then checked once that > loop has finished: > > for task in tasks: > <code snipped ...> > skip = False > if not task.get('min',[])==[-1]: > for key, value in checks: > if key in task and not value in task[key]: > skip = True > continue > if skip: > continue > > That seems to work. > > And apologies for mis-direction about expire_sessions.py - it is > actually configured to run at 1 minute past each hour, not once every > minute. That job was suffering the execution every minute for the same > reason. > > But I still cannot explain why it would skip a minute every now and > 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.

