The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Limit cron time

Discussion in 'General Discussion' started by novatech, Jan 25, 2009.

  1. novatech

    novatech Member

    Joined:
    Dec 31, 2005
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Is there anyway I can limit to cron execution to maximum once every 15 minutes?

    Thanks
     
  2. wsenter

    wsenter Well-Known Member

    Joined:
    Aug 5, 2003
    Messages:
    88
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Texas
    The format of the entry looks like this:

    minute hour day-of-month month-of-year day-of-week command

    minute 00 through 59
    hour 00 through 23 (midnight is 00)
    day-of-month 01 through 31
    month-of-year 01 through 12
    day-of-week 01 through 07 (Monday is 01, Sunday is 07)

    All five fields must be specified, but an asterisk can be used to match any time/date field. So to build an entry that would run "command" every fifteen minutes you would create a file with a text editor and place an entry in it like this:

    15,30,45,59 * * * * command

    Which would run "command" at 15 min, 30 min, 45 min, and 59 min, of every hour, of every day, of every month, of every week.
     
  3. novatech

    novatech Member

    Joined:
    Dec 31, 2005
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Thanks, but not quite what I'm looking for.

    I meant to say, is there a way to limit cron for my users? I don't want to users to run crons more than once per 15 minutes.

    Does cPanel have a solution for this, or are the scripts (or a config option) to limit cron jobs?
     
  4. wsenter

    wsenter Well-Known Member

    Joined:
    Aug 5, 2003
    Messages:
    88
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Texas
    Please be as specific as possible in the future as your question was properly addressed in my previous response. You will have to most likely write a custom script (or have one written for you). That will check all the cron tabs once every night to make sure that no one has created one. I don't know that you can exclusively limit them unless you can totally disable them from doing cron jobs at all and make them e-mail you each time they want to add one.
     
Loading...

Share This Page