Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

cPanel Cron interface can't handle "ever X hours, between Y and Z"

Discussion in 'General Discussion' started by JamesOakley, Jan 10, 2015.

  1. JamesOakley

    JamesOakley Well-Known Member

    Apr 15, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    For years, I've run cron jobs every four hours to maintain and/or backup various website.

    I stagger them - I run them at different minutes past the hour. I also don't want them all running between midnight and 1am, then between 4am and 5am, etc. So I run some at */4 hours. Others get run at "1-21/4", others at "2-22/4" and others at "3-23/4"

    It works well - but I've always done it from the command line via "crontab -e"

    I just tried setting such a job up via cPanel's Cron interface. If you enter "1-21/4" in the hours box, you get an error appear that "You did not format the date and time settings correctly." You can't add or edit the cron job while that error is showing. It's happy with "1-21", it's happy with "*/4", just not with "1-21/4".

    This is a perfectly valid cron setting for the hours field. It would be good if cPanel's interface allowed the setting.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    Hello :)

    The interface is designed to accept each hour separated by a comma. Thus, you would enter:

    You could submit a feature request to have the interface accept the additional input type via:

    Submit A Feature Request

    Thank you.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice