#设置系统时区:
sudo cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
#设置时间: date -s "2019-01-03 11:06:30"
#修改/etc/crontab文件添加:
CRON_TZ=Asia/Shanghai
TZ=Asia/Shanghai
#然后重启crond服务:
sudo /etc/init.d/crond restart
#
sudo service crond restart
sudo service rsyslog restart
#
sudo /bin/systemctl restart crond.service
sudo /bin/systemctl restart rsyslog.service
网友评论