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!

Script to check cron jobs

Discussion in 'General Discussion' started by thewebhosting, Sep 18, 2009.

  1. thewebhosting

    thewebhosting Well-Known Member

    May 9, 2008
    Likes Received:
    Trophy Points:
    We allow our users to run their custom cron jobs on our shared server not more than 5 times a day. It is difficult for us to check each users cron jobs manually since there are hundreds of domains are hosted.

    I was just wondering if there is any script available that can notify admin directly how many times users are running their cron jobs a day?

    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. MattCurry

    MattCurry Well-Known Member

    Aug 18, 2009
    Likes Received:
    Trophy Points:
    Houston, Tx
    Scripts to check Crong Jobs


    I do apologize for your issue, however I can say that we dont have a script that would do that by default. I am not saying it is not possible, we just do not have a scripts that would do that out of the box. Please let me know if you have any other questions.

    Thank you,
    Matthew Curry
  3. Spiral

    Spiral BANNED

    Jun 24, 2005
    Likes Received:
    Trophy Points:
    You just acknowledged that you can't routinely check user cron scripts for something as simple as their time settings let alone something more complex such as what they are actually running and just as a note to you, cronjob access is the same thing as allowing full unrestricted SSH access!

    If you do not follow my less than subtle point, you have a lot more to worry about than just the "time" settings of your user's cronjobs and even with the capacity to monitor things closely (which you clearly don't have setup), I still would not recommend allowing users access to setup their own cronjobs just because of the enormous security issues involved!

    Now regarding your specific question ....

    Setting up a cronjob to monitor the cronjob settings is a piece of cake and generally only takes me about 5 minutes to write from scratch to run basic checks against the crontab time settings for all users. All you really need to do is read all the crontab user files and run a quick check of the time settings for each line and disable or override the settings of those that don't meet programmed limit guidelines ---- simple grep and sed replaces will work! ;)

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