Created
April 30, 2015 13:36
-
-
Save saxbophone/08e7bae2a13f879fac6c to your computer and use it in GitHub Desktop.
Recursive shell script using Unix at daemon
This file contains hidden or 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 | |
| # A recursively self-calling shell script, using Unix at daemon | |
| # for scheduling future runs of itself. | |
| # ... | |
| # Put whatever you want your script to do here | |
| # ... | |
| # This bit will schedule this file to run again | |
| FILE_NAME="self.sh" | |
| SCRIPT_PATH=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/$FILE_NAME" | |
| RUN_TIME="00:00" | |
| echo "bash $SCRIPT_PATH" | at $RUN_TIME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment