Find the answer to your Linux question:
Results 1 to 2 of 2
Hi again, I don't really do crons too much, infact at all, but how can I set one up to sync my servers. The commands I need to run are: ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Feb 2004
    Posts
    139

    time sync cron


    Hi again,

    I don't really do crons too much, infact at all, but how can I set one up to sync my servers.

    The commands I need to run are:
    /usr/bin/rdate -s time.nist.gov && /sbin/hwclock --systohc

    What file and what do I put in there to make it run every 60 minutes? (every 30 minutes of the hour (i.e. 5:30, 6:30, etc)
    If you love something, emerge it

  2. #2
    Linux Engineer Giro's Avatar
    Join Date
    Jul 2003
    Location
    England
    Posts
    1,219
    type crontab -e to open your crontab then its like this

    Code:
    00 * * * * /usr/bin/rdate -s time.nist.gov && /sbin/hwclock --systohc
    00 is seconds, the first * is hours then its days, months, years, then the command. So this will run on the hour every hour.

Posting Permissions

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