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.

Are the following cron configurations identical?

  1. * * * * *

  2. 0 * * * *

  3. 1 * * * *

I'm looking for a configuration that will run the job every minute.

share|improve this question
    
Down voters: Is there anything wrong with my question? I am under the impression 0 * * * * might be every second? I can't test this on a shared server so I have to ask here. I am a Windows user. –  IMB Apr 27 '12 at 14:20
4  
Didn't downvote, but I would say that the question "does not show research effort". You don't have to test on an actual server to find a manual for cron :) –  slhck Apr 27 '12 at 14:24
    
@slhck I did research but it's a bit confusing but I understand that this really sounds like a noob question. –  IMB Apr 27 '12 at 14:28
2  
In the future, I know crontab is/can be confusing, so here's a crontab code generator! openjs.com/scripts/jslibrary/demos/crontab.php You can find more with google, this is the first I found though. –  Rob Apr 27 '12 at 15:12
    
Bonus Answer: */5 * * * * for every 5 minutes. Replace 5 with your desired interval. –  jmanning2k Apr 27 '12 at 18:00
add comment

2 Answers

up vote 2 down vote accepted

No.

The last two will run hourly. One at the 0 minute of every hour and the other at the 1st minute of every hour. But an all asterisk cron input means the cron job will run every minute of every day of every of every month on every weekday.

share|improve this answer
add comment

Cron's syntax specifies that an asterisk matches every possible value.

So if your "minute" column has an asterisk, that means, "run the job every minute".

If the column has a "0" or "1", that means it will run only once per hour, either at (for example) 15:00 or 15:01.

share|improve this answer
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.