0

i need to run cron job once a minute 8a.m. - 8p.m.

my code is: */01 8-20 * * * user /usr/bin/php -f script.php > /dev/null

but it seems to fail..

2
  • You don't need the /01 part. The * denotes that it will run every minute.
    – EEAA
    Feb 14, 2012 at 16:22
  • indeed! but if the interval would be 5 mins - then */05 8-20 * * *, correct? thanks!
    – drdarwin
    Feb 14, 2012 at 16:24

1 Answer 1

4

The correct line would be

* 8-20 * * * user /usr/bin/php -f script.php > /dev/null
3
  • indeed! but if the interval would be 5 mins - then */05 8-20 * * *, correct?
    – drdarwin
    Feb 14, 2012 at 16:23
  • yes, for every five minutes you would use */5, you do not need the leading zero.
    – Niko S P
    Feb 14, 2012 at 16:26
  • do you need more information on this topic or do you have any other reason not to accept this answer?
    – Niko S P
    Feb 28, 2012 at 1:00

You must log in to answer this question.

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