Jump to content

cron help


Jiraiya

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.