1

What I'm trying to do is run a Cron job at specific hours such as 1,9,13,16 but only once for each of those hours. Setting it up every few hours doesn't work for me because it needs to be at specific hours.

This is what I'm currently using but it doesn't run: 0 1,9,13,16 * * *

In order to get it to run I have to use this: 0 * * * * or * * * * *

Any ideas?

Teoman Soygul
  • 25,584
  • 6
  • 69
  • 80
stwhite
  • 3,156
  • 4
  • 37
  • 70

2 Answers2

3

0 1,9,13,16 * * * is a perfectly valid cron expression (I've just checked it with jailshell, although I was confident). It seems to me you have a problem somewhere else. Try settings the cron job using crontab -e and make a quick test with * * * * * wget google.com to see if it works at all.

Also here is a online cron job expression validator if you need it: http://www.unitedmindset.com/jonbcampos/2009/07/29/custom-validators-cron-job-expression-validator/

Teoman Soygul
  • 25,584
  • 6
  • 69
  • 80
0

1 1,9,13,16 * * *

Try minute 1 instead of 0. It works for me.

But this 0 14 * * 1-5 works for me too, or this 0 1,13 * * *.

Moe Sweet
  • 3,683
  • 2
  • 34
  • 46
  • Strange.. 1 1,9,13,16 * * * doesn't seem to work and nor does setting the minute to other numbers: 36 1,9,13,16 * * *. – stwhite Apr 14 '11 at 01:39