Writing a timer event (how to execute an event from time to time)
piotr.sikora at frickle.com
Tue May 25 13:13:06 MSD 2010
> Would you be kind enough to help me understanding how to write an
> event which executes itself from time to time, using Nginx event
> I would like to register for each request a timer to execute a given
> task each 10 seconds.
Which one are you trying to do? Because you described two very different
If you want to execute some function from time to time (for example every 10
seconds) inside nginx, then you should look at the beginning of
ngx_supervisord's code .
If you want to do delay response on the request, like in your example, then
you should look at ngx_echo module .
> I am trying this in my module handler:
As Weibin Yao already wrote, this is fundamentally wrong.
Piotr Sikora < piotr.sikora at frickle.com >
More information about the nginx-devel