Cron

Discussion in 'Site & Server Administration' started by deriklogov, Sep 10, 2009.

  1. #1
    Got issue with cron, very strange, 2 lines for ex:

    53 1,3,5,7,9,11,13,15,17,19,21,23 * * * command
    1 2,4,6,8,10,12,14,16,18,20,22,24 * * * command


    first line working without problems, second cron doesnt want to start, is there any limit on number of hours or something ?
     
    deriklogov, Sep 10, 2009 IP
  2. StephenN

    StephenN Peon

    Messages:
    17
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try:

    53 1,3,5,7,9,11,13,15,17,19,21,23 * * * command
    01 2,4,6,8,10,12,14,16,18,20,22,24 * * * command

    :)
     
    StephenN, Sep 10, 2009 IP
  3. deriklogov

    deriklogov Well-Known Member

    Messages:
    1,078
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    130
    #3
    I removed 24 from the second line and looks like it start working
     
    deriklogov, Sep 11, 2009 IP
  4. thuankkk

    thuankkk Active Member

    Messages:
    503
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    95
    #4
    Try
    1 */2 * * * command
    Code (markup):
    there's no hour 24. The 24th hour is 23, and 1st is 0 :)

    Or try www.setcronjob.com to create cron jobs every 2 hours quickly and easily.
     
    thuankkk, Sep 16, 2009 IP