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.

cronjob

Discussion in 'General Discussion' started by HH-Steven, Jan 19, 2005.

  1. HH-Steven

    HH-Steven Well-Known Member

    Joined:
    Aug 29, 2004
    Messages:
    284
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Im not too familiar with cron jobs so could someone tell me what id need to put if i wanted :

    /scripts/updatemysqlquota

    to run at midnight everyday?

    Also, where would i add this cronjob? surely adding it via cpanel wouldnt have the correct permissions for this?

    As i said im not too familiar with cronjobs so any help is greatly appreciated.

    thanks.
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    You'd have to add this as root from the shell prompt via SSH. You need the command:

    crontab -e

    That should put you into the pico editor. Then add the following line at the top:

    0 0 * * * /scripts/updatemysqlquota

    Then exit by hitting ctrl-x and then enter. That should now run that script daily at midnight for you.
     
  3. damainman

    damainman Well-Known Member

    Joined:
    Nov 13, 2003
    Messages:
    515
    Likes Received:
    0
    Trophy Points:
    16
    What would be the purpose of having /scripts/updatemysqlquota run nightly?..Just curious.
     
Loading...

Share This Page