Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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..

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

1 Answer 1

The correct line would be

* 8-20 * * * user /usr/bin/php -f script.php > /dev/null
share|improve this answer
    
indeed! but if the interval would be 5 mins - then */05 8-20 * * *, correct? –  drdarwin Feb 14 '12 at 16:23
    
thankU very much! –  drdarwin Feb 14 '12 at 16:23
    
yes, for every five minutes you would use */5, you do not need the leading zero. –  Niko S P Feb 14 '12 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 '12 at 1:00

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.