Run script on shutdown of machine
4465
Execute a script upon logout/reboot/shutdown in Ubuntu
21270
How do I write a bash script to restart a process if it dies?
135665
How can I do a full shutdown of windows 10 without logging in?
137557
How to run a script, depending on internet connection
120033
How can I shut down the PC after specified amount of time?
7213
Conveniently schedule a command to run later?
157362
upstart scripts: run a task after networking goes up
67821
How to shutdown automatically when AC power is not available
28288
How do I kill background processes / jobs when my shell script exits?
52511
Best way to make a shutdown hook?
24962
An init-script does not get called on shutdown
1327
how would I run a script or application when idle?
113099
Using The Terminal Command to Shutdown, Restart and Sleep My Mac?
12300
How to execute a script periodically without using crontab?
7117
How to automatically restart a linux background process if it fails?
128510
Run a program from python, and have it continue to run after the script is killed
12663
How can I run a script on boot?