Welcome! Log In Create A New Profile

Advanced

Re: run an action every 30 seconds

February 08, 2011 07:06AM
server {
listen 8082;
server_name localhost;

location = /a-help2 {
content_by_lua 'ngx.say(ngx.time())';
}
location = /a-help {
proxy_pass http://127.0.0.1:8082/a-help2;
}
location = /a {
echo_location /a-help;
echo_sleep 2;
echo_location /a-help;
}
}

start a cron job to curl localhost:8082/a
just a sample conf.

require nginx-echo module( https://github.com/agentzh/echo-nginx-module )


On Tue, Feb 8, 2011 at 7:35 PM, michalkraus <nginx-forum@nginx.us> wrote:
> Thanks for your options
>
>> 3) Use a heartbeat solution - http://linux-ha.org/wiki/Main_Page
>
> I have API between the Nginx and the second (control) server. I use RPC
> interface. I need just send a RPC request (with status infrmation) to
> the control server. I think that heartbeat is too robust.
>
>> 4) Use cron to start a script which does the test, sleeps for 30s,
> then does
>> the test again, then dies (to be restarted by cron
>> at the next minute)
>
> This option seems to be the best but is any possibility the nginx to do
> it in its own?
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,173142,173166#msg-173166
>
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx
>



--
Regards,

林青(Kindy Lin)

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

run an action every 30 seconds

michalkraus February 08, 2011 05:37AM

Re: run an action every 30 seconds

baalchina February 08, 2011 06:02AM

Re: run an action every 30 seconds

Gregory Agerba February 08, 2011 06:08AM

Re: run an action every 30 seconds

Mark Rogers February 08, 2011 06:14AM

Re: run an action every 30 seconds

michalkraus February 08, 2011 06:35AM

Re: run an action every 30 seconds

kindy February 08, 2011 07:06AM

Re: run an action every 30 seconds

Gregory Agerba February 08, 2011 06:10AM

Re: run an action every 30 seconds

António P. P. Almeida February 08, 2011 06:28AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 321
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready