Find the answer to your Linux question:
Results 1 to 3 of 3
Hi, is it possible to have a schedule in cron to start at 5:30 am and then execute every 5 minutes after that until 9pm using a single cron line? ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2008
    Posts
    1

    crontab, scheduling for 5:30 and up.


    Hi, is it possible to have a schedule in cron to start at 5:30 am and then execute every 5 minutes after that until 9pm using a single cron line? Right now im using two cron lines.

    # for 6am - 9pm
    */5 6-21 * * 1-5

    # for 5:30am - 6 am
    30,35,40,45,50,55 5 * * 1-5

  2. #2
    Linux Enthusiast meton_magis's Avatar
    Join Date
    Oct 2006
    Location
    arizona
    Posts
    699
    do you have something against using 2 lines??

    the only other alternative to using multimple lines, is have cron run a script that executes your end program, and in the script do an if statement that checks `date` to find out if it's past 5:30
    New to the internet, technical forums, or the hacker / open source community??
    Read this to learn good posting habits http://www.catb.org/~esr/faqs/smart-questions.html

    RHCE for RHEL version 5
    RHCT for RHEL version 4

  3. #3
    Just Joined!
    Join Date
    Feb 2005
    Posts
    7
    two lines is fine. I was just wondering if there was a way to do it in one line. cron scheduling is very flexible, so I was just trying to see if there was any technique I did not know of.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •