diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2022-12-04 17:04:11 +0100 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2022-12-04 17:04:11 +0100 |
commit | 17df410300d14397b963a184ab3fdf854ea10ff3 (patch) | |
tree | cb9f9c4f239d94f7ceb2cb633ac25fdab2553767 /docker/schedule.sh | |
parent | t/i/docker: test the frontend also (diff) | |
download | cgitize-17df410300d14397b963a184ab3fdf854ea10ff3.tar.gz cgitize-17df410300d14397b963a184ab3fdf854ea10ff3.zip |
docker: make schedule.sh more reusable
Diffstat (limited to 'docker/schedule.sh')
-rwxr-xr-x | docker/schedule.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/docker/schedule.sh b/docker/schedule.sh index 0f3fa20..db7ae26 100755 --- a/docker/schedule.sh +++ b/docker/schedule.sh @@ -42,8 +42,10 @@ setup_cron_task() { make_task_script "$@" > /task.sh chmod +x /task.sh - # Run the task once when the container is started, regardless of schedule. - /task.sh + if [ -n "$SCHEDULE_ON_START" ]; then + # Run the task once when the container is started. + /task.sh + fi local crontab crontab="$schedule /task.sh |