1. 建立crontab的脚本

    $ vi /etc/cron.daily/ntpupdatedaily
添加如下行:
    #!/bin/bash
    ntpdate stdtime.gov.hk

2. 添加到crontab任务

    $ crontab -e
在最后添加(表示每天晚上20:00以root身份运行/etc/cron.daily/ntpupdatedaily):
    00 20 * * * root /etc/cron.daily/ntpupdatedaily

By Leslie Guan

相关文章:

  • 2021-11-17
  • 2021-05-22
  • 2022-12-23
  • 2021-12-09
  • 2021-07-18
猜你喜欢
  • 2021-12-13
  • 2021-05-21
  • 2021-04-07
  • 2022-01-08
  • 2022-12-23
相关资源
相似解决方案