DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Crontab help!!!

  1. #1
    Join Date
    Apr 2007
    Location
    USA
    Posts
    110

    Crontab help!!!

    Hi all,
    I wish to schedule a script that would run every two hrs everyday except between 8:00pm and 10:00pm

    Thanks...
    Looking for the greatest evil in the world? Look in the mirror.

  2. #2
    Join Date
    Apr 2007
    Location
    USA
    Posts
    110
    Let me clarify some more.....

    I wish to schedule a script that would run every two hrs everyday starting at midnight except between 8:00pm and 10:00pm

    Thanks...
    Looking for the greatest evil in the world? Look in the mirror.

  3. #3
    Join Date
    Oct 2006
    Posts
    175
    I haven't tried this but I think either should help:

    crontab -e
    #type following
    01 0,2,4,6 * * *
    01 12,14,16,18,20,22 * * *

    crontab -e
    #type following
    01 0-6 * * *
    01 12-22 * * *

    HTH

  4. #4
    Join Date
    Apr 2007
    Location
    USA
    Posts
    110
    Quote Originally Posted by Tuma View Post
    Let me clarify some more.....

    I wish to schedule a script that would run every two hrs everyday starting at midnight except between 8:00pm and 10:00pm

    Thanks...
    what about this?.....for something that runs from midnight everyday every 2 hrs except between 8:00pm and 10:00pm

    00 0,2,4,6,8,10,12,14,16,18 * * * /xxxxx/xxxxxx.sh 1>/dev/null 2>&1
    Looking for the greatest evil in the world? Look in the mirror.

  5. #5
    Join Date
    Nov 2002
    Location
    Mooresville, NC
    Posts
    349
    Quote Originally Posted by Tuma View Post
    what about this?.....for something that runs from midnight everyday every 2 hrs except between 8:00pm and 10:00pm

    00 0,2,4,6,8,10,12,14,16,18 * * * /xxxxx/xxxxxx.sh 1>/dev/null 2>&1
    Yes that should work.
    http://www.perf-engg.com
    A performance engineering forum

Posting Permissions

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


Click Here to Expand Forum to Full Width