H He3am Verified User Joined Mar 7, 2013 Messages 95 Jul 13, 2013 #1 hi i need create cronjob for run this command every hourse ntpdate 0.asia.pool.ntp.org thanks
Richard G Verified User Joined Jul 6, 2008 Messages 13,875 Location Maastricht Jul 13, 2013 #2 Easy to find with google, look at /etc/crontab or.... well... this is too easy to find. Code: 0 * * * * /usr/sbin/ntpdate -s 0.asia.pool.ntp.org Change the path to ntpdate as neede on your system. The "-s" commandline option is used to log to syslog intead of to default output (mostly screen).
Easy to find with google, look at /etc/crontab or.... well... this is too easy to find. Code: 0 * * * * /usr/sbin/ntpdate -s 0.asia.pool.ntp.org Change the path to ntpdate as neede on your system. The "-s" commandline option is used to log to syslog intead of to default output (mostly screen).
zEitEr Super Moderator Joined Apr 11, 2005 Messages 15,453 Location www.poralix.com Jul 14, 2013 #3 He3am said: hi i need create cronjob for run this command every hourse ntpdate 0.asia.pool.ntp.org thanks Click to expand... You'd better not do that. You should consider using of ntpd (it's daemon to sync time).
He3am said: hi i need create cronjob for run this command every hourse ntpdate 0.asia.pool.ntp.org thanks Click to expand... You'd better not do that. You should consider using of ntpd (it's daemon to sync time).
Richard G Verified User Joined Jul 6, 2008 Messages 13,875 Location Maastricht Jul 14, 2013 #4 Just out of curiousity... Why is it better to use the daemon Zeiter? I also use a cronjob, but I only let it run once a day.
Just out of curiousity... Why is it better to use the daemon Zeiter? I also use a cronjob, but I only let it run once a day.
zEitEr Super Moderator Joined Apr 11, 2005 Messages 15,453 Location www.poralix.com Jul 14, 2013 #5 Good answer and description can be found in man and here http://serverfault.com/questions/16467/compare-ntpd-and-ntpdate as well.
Good answer and description can be found in man and here http://serverfault.com/questions/16467/compare-ntpd-and-ntpdate as well.