I want to reboot at every minute but my code doesn't work.
Your line is commented out so never performed
-> delete the
#at the start
It should be
* * * * *for every minute
(Thanks to @Rinzwind)
rebootdoes not work It has to be
systemctl reboot -i
So in the end in your file there should be the line
* * * * * systemctl reboot -i
-i here stands for ignore-inhibitors. Some programs put this inhibitors lock to prevent dataloss so you wouldn't reboot but get a note in the command line.
This should do the trick
Note: Not letting unmentioned here that this doesn't seem a smart idea to me ... Why do you want that? And make sure you are able to revert this before your system reboots again when you don't want this anymore ;)