Answer the question
In order to leave comments, you need to log in
What is my mistake in Cron?
Hello.
I set up iptables on the server, and in order not to mess up and lose access, I added to the
crontab -e
line
#m h dom mon dow command
#Safemode
5 * * * * reboot
Answer the question
In order to leave comments, you need to log in
you need to either set the PATH variable in the crontab or write the full path:
/usb/sbin/reboot
Look at your root mail - there should be messages if the cron wrote something.
You can also check /var/log/syslog.
Maybe systemctl reboot
?
Well, and I hope that the user on the server is one root?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question