The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Execute PHP script every X seconds?
Hello everyone.
I have developed a rather complex script to query a gameserver which also makes checks on players within. However the issue I am having difficulty with is running the PHP script every X seconds. I know of a simple way which works but doesnt seem too accurate when executing it for me. Code:
$overall_time = 0; while ($overall_time < 60) { $overall_time +10= ; sleep(10); // The script } Any help appreciated. Matt |
#2
|
||||
|
||||
PHP Code:
|
#3
|
||||
|
||||
Hi Dismounted. Out of interest is this best and most reliable way to run a script every X seconds?
Thanks for your assistance. |
#4
|
||||
|
||||
Most reliable? Maybe not. The PHP script will still suffer from timeouts as defined in php.ini. The best way I can think of right now is to create a shell script that will sleep and run your PHP script (with a cron kicking it).
|
#5
|
||||
|
||||
Any idea then how to do it with Shell?
Your help is appreciated |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|