#!/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