Last active
January 9, 2016 00:46
-
-
Save SYZYGY-DEV333/e82d45d5a4cdfecf3602 to your computer and use it in GitHub Desktop.
A shell script to restart a program every 20 minutes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while : | |
do | |
sleep 1200 | |
killall -I -q process-name | |
sleep 1 | |
start-command | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage
Replace process-name with the name of the process.
Replace start-command with the command to start the process.
Sleep value can be changed. Default 1200 seconds or 20 minutes.