aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/docker/schedule.sh
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2022-12-04 17:04:11 +0100
committerEgor Tensin <Egor.Tensin@gmail.com>2022-12-04 17:04:11 +0100
commit17df410300d14397b963a184ab3fdf854ea10ff3 (patch)
treecb9f9c4f239d94f7ceb2cb633ac25fdab2553767 /docker/schedule.sh
parentt/i/docker: test the frontend also (diff)
downloadcgitize-17df410300d14397b963a184ab3fdf854ea10ff3.tar.gz
cgitize-17df410300d14397b963a184ab3fdf854ea10ff3.zip
docker: make schedule.sh more reusable
Diffstat (limited to 'docker/schedule.sh')
-rwxr-xr-xdocker/schedule.sh6
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