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.

I'm just getting back into bash scripting and I want my cron job to run every 15 minutes between 9.15 and 10 PM. I've checked the script works, but I don't know if it's the right command:

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user  command
17 *    * * *   root    cd / && run-parts --report /etc/cron.hourly
25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6    * * 7   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6    1 * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
15-59/15 21-22 * * 6 craig ./home/craig/Videos/iPlayer/.Code/DrDown.sh

I have tried to set it to run every minute but I don't think I can tell if the program outputs anything until an external service updates (around 8.45 every Saturday).

share|improve this question
    
It'll run on Saturdays at 21:15, 21:30, 21:45, 22:15, 22:30, 22:45. If it's too complicated to do in one line, just write it on two. 15-45 21 and 0 22 should do it. –  Daniel Beck Sep 4 '12 at 22:09
1  
Is the leading dot in front of the path a typo or did you mean to use a relative path? –  Ansgar Wiechers Sep 4 '12 at 22:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.