I know this post is a bit old, but there is a simple way to do this within
web.py

Simply override the default handler using "app.add_processor(new_func)"

inside new_func() you can do stuff before or after your class handlers.
Inside my code I have new_func start a thread, do perform some background
work.


For instance in blogstrap, I wanted to updated the statistics every few
hours.

Have a look at: https://gist.github.com/mox1/8925587




On Mon, Feb 10, 2014 at 2:22 AM, Easy Cron <[email protected]> wrote:

> Another webcron service is at http://www.easycron.com. Hope it helps.
>
> On Thursday, November 7, 2013 1:34:56 AM UTC+8, drx wrote:
>>
>> You could try http://webcron.org/
>> That is a service that pings URLs for you.
>>
>> Am 31.10.2013 16:54, schrieb [email protected]:
>> > I have a site which has to do a task every 60 seconds.
>> > Now what I'm doing is creating a page with a class with a loop with
>> sleep on it.
>> > The problem is that I have to call the Url every time I want it to
>> start after
>> > restarting the server.
>> > I would like to have it to start automatically.
>> >
>> > How could I do it in a pretty way? (not creating a thread and calling
>> GET from
>> > httplib, for example)
>> >
>> >
>> > Thanks, and sorry for my bad English!
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> Groups
>> > "web.py" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> an email
>> > to [email protected].
>> > To post to this group, send email to [email protected].
>> > Visit this group at http://groups.google.com/group/webpy.
>> > For more options, visit https://groups.google.com/groups/opt_out.
>>
>> --
>> http://1x-upon.com/~despens/ >NEW!<
>> http://noobz.cc/
>> http://contemporary-home-computing.org/1tb/
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "web.py" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/webpy.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/webpy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to