#!/bin/bash | |
# Start the run once job. | |
echo "Docker container has been started" | |
# Setup a cron schedule | |
echo "* * * * * /run.sh >> /var/log/cron.log 2>&1 | |
# This extra line makes it a valid cron" > scheduler.txt | |
crontab scheduler.txt | |
cron -f |
This comment has been minimized.
This comment has been minimized.
I think the #!/bin/bash
# Start the run once job.
echo "Docker container has been started"
# Setup a cron schedule
printf "* * * * * /run.sh >> /var/log/cron.log 2>&1\n# This extra line makes it a valid cron" > scheduler.txt
crontab scheduler.txt
cron -f |
This comment has been minimized.
This comment has been minimized.
@peter279k Yes, it can be rewritten in a single line as you suggested. The only difference is the former one serves better clarity. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
It looks like it misses the
"
on line7
. And I think the fixed snippets are as follows: