man 5 crontab is pretty clear on how to use crontab to run a script on boot:
I developed an algorithm for a fairly hard problem in mathematics which is likely to need several months to finish. As I have limited resources only, I started this on my Ubuntu 12.04 (x86) laptop. Now I want to install some updates and actually restart the laptop (the “please reboot” message is just annoying).
In Arch Linux, if I do
ls -l in
/sbin, I can see that
poweroff are all symlinks to
/usr/bin/systemctl. But issuing
systemctl commands obviously does not all have the same behaviour.
What security risk is posed by not requiring this to have root privileges? The GUI provides a way for any user to shut off or restart, so why do the terminal commands need to be run as root?
I’ve got node.js and pm2 installed on a Pi (Raspbian). PM2 was configured to start via
pm2 startup and the init scripts it creates. Sometimes when I reboot, shutdown hangs for a few minutes on:
Is there a command I can type in a terminal that will tell me the last time a machine was rebooted?
I’m writing a shell script in bash. At some point in the script, it detects that the machine needs to be rebooted before continuing. It issues: