keep running
Kepp a script or bash cmd running. Relaunch the command or script when exit.
https://pypi.python.org/pypi/keep-running
installation
pip install keep-running
usage
For example: test-program.sh
#!/bin/bash
for i in {1..10}
do
echo `date` ':' $i
sleep 1
done
Keep it running:
$ keep-running test-program.sh
files
-
log file
The log file will be:
test-program.sh.log
in the same directory withtest-program.sh
. -
lock file
The file used to lock is
test-program.sh.lock
.
Enjoy coding!