A slight improvement to my comment: if your script exits with true (e.g. when it ends with exit 0
), you can run
while script; do sleep 10; done
This is the canonical way to repeat a command as long as it doesn’t fail.
A slight improvement to my comment: if your script exits with true (e.g. when it ends with exit 0
), you can run
while script; do sleep 10; done
This is the canonical way to repeat a command as long as it doesn’t fail.