Thank you for this information, that makes sense! I started talking
to achipa.
My use for @reboot was to implement background processes to provide
similar functionality to GAE task/work queues (like in a producer-
consumer pattern). But perhaps there is a better way to spawn that
thread.
One problem with @reboot as documented is that I saw this comment in
widget.py:
# ## if -C start cron run
# ## if -N disable cron in this *process*
# ## - note, startup tasks WILL be run regardless !
...and for my purposes, startup tasks should NOT run when I'm in a
shell. So... perhaps I really need something different, or perhaps it
would be good to change the cron semantics.
I will think on this and get back to you.
On Jan 1, 3:44 pm, mdipierro <[email protected]> wrote:
> Thank you for the patch toomim. I am uploading it in trunk now.
> User achipa wrotecron.py and I believe @reboot was only meant to work
> wuth extcron.
> I am sure this can be changed but I need to think about it. If you
> have any idea let me know.
>
> Massimo
>
> On Dec 31 2009, 5:49 pm, toomim <[email protected]> wrote:
>
>
>
> > There have been a couple posts to this list from people who couldn't
> > getcron's...@reboot to work. I found the following problems:
>
> > 1) the crondance function has an argument for "startup", setting it to
> > True tells it to run the @reboot tasks. However, crondance is never
> > called with startup=True, so reboot tasks never run.
>
> > Where should this be called? In widget.py?
>
> > 2) the `task' variable on line 307 sometimes doesn't have a 'min'
> > field and throws an error.
> > 3) when starting up, I presume we only want to run @reboot tasks.
>
> > I fixed 2) and 3) with this patch tocron.py:
>
> > - if startup and task['min'] == -1:
> > - go = True
>
> > + if startup:
> > + # On startup, only look for the reboot task
> > + go = 'min' in task and -1 in task['min']
>
> > Ideas for how to fix 1?
--
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.