Results 1 to 5 of 5

Thread: How to set a cron job?

  1. #1
    Join Date
    Nov 2008
    Beans
    1

    How to set a cron job?

    Hi,

    I'm looking to set up a cron job to sync my server time every 30 mins, otherwise it will go out of sync. However, i've never done this before. Would appreciate if anyone could tell me how to do it. Using Ubuntu Server 8.04

    Cheers

  2. #2
    Join Date
    Sep 2007
    Location
    Masschusetts
    Beans
    1,510
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: How to set a cron job?

    Quote Originally Posted by Dilude View Post
    Hi,

    I'm looking to set up a cron job to sync my server time every 30 mins, otherwise it will go out of sync. However, i've never done this before. Would appreciate if anyone could tell me how to do it. Using Ubuntu Server 8.04

    Cheers
    Add script or command to crontab

    To edit your crontab

    Code:
    crontab -e
    To edit root's crontab, add sudo to that command

    man crontab for more information
    Registered Linux User: 482377
    MacBook (1,1) - OS X Leopard
    ASUS P5LD2 - Core 2 Duo 3.0GHz - 2GB Corsair RAM - Nvidia 8800GT - Ubuntu 9.04 / Windows 7 Professional

  3. #3
    Join Date
    Nov 2007
    Location
    Atlanta, Georgia
    Beans
    494
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: How to set a cron job?

    I second the above post.

    Most likely you are going to want to set this up as a root cron job.
    GNU/Linux>Windows

  4. #4
    Join Date
    May 2008
    Beans
    185

    Re: How to set a cron job?

    Have a look at the Wiki article:

    https://help.ubuntu.com/community/CronHowto

  5. #5
    Join Date
    Apr 2006
    Location
    Montana
    Beans
    Hidden!
    Distro
    Kubuntu Development Release

    Re: How to set a cron job?

    IMO, one of the most common mistakes with cron is failing to specify the full path to your applications.

    Cron runs with a minimal shell, so, IMO, best to specify the full path of any command you wish to add.
    There are two mistakes one can make along the road to truth...not going all the way, and not starting.
    --Prince Gautama Siddharta

    #ubuntuforums web interface

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •