I have a cronjob system with PHP. I have a file named cron.php and wanna to check if it is not loaded, load it. it is very important to me that this file run only one time and I need the way how define it is already running. I can’t use any system functions like exec,system,… do you have any solutions?
NOTE: I run my script trough CURL and include_one and require_once don’t work for this case.
You could use
flock()to lock the php file itself, like this: