Say you want to run a job every 30 minutes on linux (or osx) using crontab. Sometimes I see the the sytax written like this:
30 * * * * /path/to/job
and sometimes I see it written like
*/30 * * * * /path/to/job
Are those two lines equivalent? (They seem to be based on my tests). Are there any differences?
Answer
They shouldn't behave identically. The first line tells crontab to execute the job 30 minutes past every hour (i.e. 5:30, 6:30, 7:30 ...), while the second line tells crontab to execute the job every 30 minutes (i.e. 5:00, 5:30, 6:00, 6:30 ...)
You can check the crontab man page for detailed instructions.
No comments:
Post a Comment