type crontab -l to see the list of cron jobs.
type which php to see the location of the installation of php location
type crontab -e to edit the cron job.
minute hour day month day-of-week command-line-to-execute
The acceptable values for each of the 6 fields are:
| Field | Range of values |
|---|---|
| minute | 0-59 |
| hour | 0-23 |
| day | 1-31 |
| month | 1-12 |
| day-of-week | 0-7 (where both 0 and 7 mean Sun, 1 = Mon, 2 = Tue, etc) |
| command-line-to-execute | the command to run along with the parameters to that command if any |
So if I want my cron job to run every at 9:30 pm
we Write
39 21 * * 6 /usr/bin/php /home/www/htdocs/biraj/testbiraj.php
and press ESC :wq
/usr/bin/php /=="PHP LOCATION"
home/www/htdocs/biraj/testbiraj.php == "LOCATION OF THE EXECUTABLE FILE"
for more details refer http://www.thesitewizard.com/general/set-cron-job.shtml
No comments:
Post a Comment