The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Alternatives to php unlink to stop an overlapping script run?
Hi everyone,
I have a script that runs every 3 seconds kickstarted by CRON every minute. I want to however stop the script overlapping itself as it sometimes does, so in short, I would like to only allow it to run once per time. So I formulated a method without using MYSQL, a simple .txt file check as follows. The only issue is sometimes and randomly it forgets to remove the file so I end up with a script not running at all. At times my script willl run for a few hours then eventually stop as the txt file hasnt deleted after one of the script run. Other times, it simply runs once and then doesnt do so again as the file or command unlink hasnt worked. The only way to then start everything again is remove the file manually using FTP. So, my question is, any ideas for simple alternatives or if not, what could be the reason for the random non deletion of the file on the server? PHP Code:
Thanks in advance. Matt |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|