Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 2 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .