Centos6.4(linux)下nptdate定时更新时间脚本

    Read

任务要求:系统每天在21:00的时候同步时间,以保证系统时间的准确性。

脚本如下:
备注:若你的定时任务中有其他内容,请使用>>累加,而不是>覆盖!


以上脚本,拆分如下:

脚本内容如下:

将脚本加入定时任务中:

增加内容如下:

测试过程如下:

将定时任务改回需要的效果

关于定时任务的说明:
SourceByrd's Weblog-https://note.t4x.org/system/linux-crontab-ntpdate/

如果在使用ntpdate中有问题,可以参考:ntp同步SourceByrd's Weblog-https://note.t4x.org/system/linux-crontab-ntpdate/

申明:本文由BYRD原创(基于Centos6.4 X64),未经许可禁止转载!SourceByrd's Weblog-https://note.t4x.org/system/linux-crontab-ntpdate/ SourceByrd's Weblog-https://note.t4x.org/system/linux-crontab-ntpdate/

申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!
Byrd
  • by Published on April 7, 2014
  • 原文链接:https://note.t4x.org/system/linux-crontab-ntpdate/
匿名

Comment

Anonymous

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: