Jiraiya Posted December 25, 2008 Share Posted December 25, 2008 i need help on how to create a cron i have looked for tutorials but dont really get it. i want to create a cron that updates a varable in my table every hour Link to comment https://forums.phpfreaks.com/topic/138361-cron-help/ Share on other sites More sharing options...
corbin Posted December 25, 2008 Share Posted December 25, 2008 A cron job can do very little on it's own. It's just capable of firing off an executable with arguments, so the cron wouldn't actually update a value on a table; it would fire off a script or something that would. cron is the program, and it reads cron tabs. So really, you don't want to create a cron; you want to create a crontab entry. http://en.wikipedia.org/wiki/Cron#crontab_syntax If you wanted the PHP script /SomeScript.php to run the 33rd minute of every hour, you would add the following line to the crontab file: 33 * * * * php /SomeScript.php Oh, you might want to pipe it to null, by the way: 33 * * * * php /SomeScript.php > /dev/null 2>&1 Link to comment https://forums.phpfreaks.com/topic/138361-cron-help/#findComment-723638 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.