m002.p
06-08-2009, 10:29 PM
Hi guys,
I am attempting to get a PHP script which checks a gameserver, to run continously using CRON as a kick.
I have a system in place on UNIX allowing my script to not overlap and only run once at a time.
Anyone got any suggestions with the best way to loop a script continuously or run it every 3 seconds?
Note, I use functions in this script which usually results in the 'cannot redeclare function' error if I try the usual methods of running scripts more often than CRONs 1 min. Anyway round this than expanding the functions into regular code?
Thanks in advance
Matt
I am attempting to get a PHP script which checks a gameserver, to run continously using CRON as a kick.
I have a system in place on UNIX allowing my script to not overlap and only run once at a time.
Anyone got any suggestions with the best way to loop a script continuously or run it every 3 seconds?
Note, I use functions in this script which usually results in the 'cannot redeclare function' error if I try the usual methods of running scripts more often than CRONs 1 min. Anyway round this than expanding the functions into regular code?
Thanks in advance
Matt