Skip to content

Instantly share code, notes, and snippets.

@SYZYGY-DEV333
Last active January 9, 2016 00:46
Show Gist options
  • Save SYZYGY-DEV333/e82d45d5a4cdfecf3602 to your computer and use it in GitHub Desktop.
Save SYZYGY-DEV333/e82d45d5a4cdfecf3602 to your computer and use it in GitHub Desktop.
A shell script to restart a program every 20 minutes.
#!/bin/bash
while :
do
sleep 1200
killall -I -q process-name
sleep 1
start-command
done
@SYZYGY-DEV333
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment