Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

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.

share|improve this answer
    
Great, thanks!!! –  evan Nov 18 '10 at 22:22
    
When you say */30 runs the job every thirty minutes, that means from the time you finish editing the crontab file - or always on the hour and on the half hour? –  evan Nov 18 '10 at 22:25
    
@evan: On the hour and half hour. –  Dennis Williamson Nov 19 '10 at 3:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.