1

Are the following cron configurations identical?

  1. * * * * *

  2. 0 * * * *

  3. 1 * * * *

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

5
  • 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, 2012 at 14:20
  • 5
    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, 2012 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, 2012 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, 2012 at 15:12
  • 1
    Bonus Answer: */5 * * * * for every 5 minutes. Replace 5 with your desired interval.
    – jmanning2k
    Apr 27, 2012 at 18:00

2 Answers 2

3

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.

3

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.

You must log in to answer this question.

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