VPS上设定每天上午4点自动重启

Tags:

修改crontab

# 修改时区
timedatectl set-timezone Asia/Shanghai

crontab -e
# m h  dom mon dow   command
# add the following line to reboot at 4am
0  4 * * * /sbin/reboot

Leave a Reply