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

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

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


以上脚本,拆分如下:

脚本内容如下:

将脚本加入定时任务中:

增加内容如下:

测试过程如下:

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

关于定时任务的说明:
文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/system/linux-crontab-ntpdate/

如果在使用ntpdate中有问题,可以参考:ntp同步文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/system/linux-crontab-ntpdate/

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

申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!

On this day in past years
April
7
 
Byrd
  • by Published onApril 7, 2014
  • 原文链接:https://note.t4x.org/system/linux-crontab-ntpdate/
匿名

Comment

Anonymous

Slide puzzle verification.