I try to run multiple php scripts from 1 folder with cron updates in it. With the script below I like to check all files in the folder (file names are exact the same as the names in the database).
The problem is that it seems that my .log files are not loaded.
Anybody has a solution for me how I can get this script working?
$cron2 = mysql_query("SELECT * FROM `cron` ORDER BY (`name`) DESC LIMIT 0,999"); while ($crondata = mysql_fetch_assoc($cron2)) {//Select runlogs
$RunLog = 'includes/crons/' . $crondata->name . '.log'; //make sure you have this file downloaded too if (file_exists($RunLog)) { $lastRun = file_get_contents($RunLog); if (time() - $lastRun >= $crondata->seconds) { //This will check last time file ran. //Select all cronjobs from the database $select = mysql_query("SELECT name FROM `cron` ORDER BY (`name`) DESC LIMIT 0,999"); while ($list = mysql_fetch_assoc($select)) { $cron = file_get_contents('http://' . $_SERVER['SERVER_NAME'] . '/includes/crons/' . $list[name] . '.php?password=' . $cron_password . ''); // here you put the link for your file or the php code file_put_contents($RunLog, time()); } } }}
NOTE: this script is working http://plaatscode.be/142266/ but the problem is that this only run 1 file in the folder and I have multiple script in there. Maybe this will give some help...
Thanks for the help.