Preventing Cron Job Collision
Note Prevents jobs to collide if they take longer to run than the frequency itself $fp = fopen(‘/tmp/lock.txt’, ‘r+’); if(!flock($fp, LOCK_EX | LOCK_NB)) { ย … Read More »Preventing Cron Job Collision
Note Prevents jobs to collide if they take longer to run than the frequency itself $fp = fopen(‘/tmp/lock.txt’, ‘r+’); if(!flock($fp, LOCK_EX | LOCK_NB)) { ย … Read More »Preventing Cron Job Collision
if (isset($_SERVER[‘REMOTE_ADDR’])) die(‘Permission denied.’); Note it’s also possibl with a .htaccess file and “deny from all ” in that file