Created
June 21, 2019 06:39
-
-
Save nehabhardwaj01/e6694a1efc6efe7ddf1309184f91dba9 to your computer and use it in GitHub Desktop.
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 | |
# Start the run once job. | |
echo "Docker container has been started" | |
declare -p | grep -Ev 'BASHOPTS|BASH_VERSINFO|EUID|PPID|SHELLOPTS|UID' > /container.env | |
# Setup a cron schedule | |
echo "SHELL=/bin/bash | |
BASH_ENV=/container.env | |
* * * * * /run.sh >> /var/log/cron.log 2>&1 | |
# This extra line makes it a valid cron" > scheduler.txt | |
crontab scheduler.txt | |
cron -f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment