crontab执行时间与系统时间不一致问题解决

crontab执行时间与系统时间不一致
计划任务:
25 0 * * * bash scripts.sh
任务应在00:25执行,检查日志/var/log/cron,发现任务在00:25执行,脚本输出文件时间为前一日16:25。
crontab 时间与系统时间不一致
重启crond服务。
systemctl restart crond
重启后检查日志,发现日志时间仍与系统时间不一致,
重启日志服务
systemctl restart rsyslog

总结:
1、计划任务执行时间与系统时间不一致,重启crond服务
2、日志时间与系统时间不一致,重启rsyslog服务。

posted @ 2025-05-17 15:09  Yaoxz1  阅读(75)  评论(0)    收藏  举报