How to set Linux Cron Jobs?

Discussion in 'Site & Server Administration' started by Jalpari, Apr 8, 2009.

  1. #1
    How to set cron jobs in linux for every 3 hour , i do not know anything about linux handling :confused:
     
    Jalpari, Apr 8, 2009 IP
  2. norbert

    norbert Guest

    Messages:
    61
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    The syntax for a system wide cron job for every three hours is:
    vi /etc/crontab
    
    * */3 * * * user command;
    
    Code (markup):
     
    norbert, Apr 8, 2009 IP
  3. MayurGondaliya

    MayurGondaliya Well-Known Member

    Messages:
    1,233
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    170
    #3
    If you have any control panel then you can add cron jobs directly from there.

    e.g. if you have cPanel then you will find "Cron Jobs" there. Select Standard and set job as per your requirement.
     
    MayurGondaliya, Apr 8, 2009 IP
  4. ActiveFrost

    ActiveFrost Notable Member

    Messages:
    2,072
    Likes Received:
    63
    Best Answers:
    3
    Trophy Points:
    245
  5. ClassHelper.org

    ClassHelper.org Guest

    Messages:
    273
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #5
    From a shell, try "crontab -e". This should pull up the current crontab for whatever user you were logged in as. For system-wide cron jobs, you can still use that command, just execute it as root. It's easy to specify which user a job should run as. For additional information, please refer to the Cron HOWTO in the Ubuntu Community Documentation.
     
    ClassHelper.org, Apr 10, 2009 IP
  6. ActiveFrost

    ActiveFrost Notable Member

    Messages:
    2,072
    Likes Received:
    63
    Best Answers:
    3
    Trophy Points:
    245
    #6
    sudo crontab -e ( as you don't want to receive "permission denied" ) :)
     
    ActiveFrost, Apr 10, 2009 IP
  7. thuankkk

    thuankkk Active Member

    Messages:
    503
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    95
    #7
    You can use an external cron jobs service
     
    thuankkk, Apr 11, 2009 IP