CRONTAB 排程工作
利用 CRONTAB 來排程 OpenWRT 上執行的工作
Last updated
利用 CRONTAB 來排程 OpenWRT 上執行的工作
Last updated
*/1 * * * * echo "hello"root@OpenWrt:~# logread
Jun 21 07:17:01 OpenWrt cron.err crond[1211]: USER root pid 1495 cmd echo "hello"# Reboot at 0:45am every day
# Note: To avoid infinite reboot loop, wait 70 seconds
# and touch a file in /etc so clock will be set
# properly to 0:46 on reboot before cron starts.
45 0 * * * sleep 70 && touch /etc/banner && reboot# start the cron service
/etc/init.d/cron enable
/etc/init.d/cron startJan 1 08:01:21 OpenWrt daemon.info dnsmasq[1253]: using local addresses only for domain lan
Jun 21 00:48:23 OpenWrt cron.err crond[1212]: time disparity of 25491887 minutes detected