diff --git a/docker/Dockerfile.gui b/docker/Dockerfile.gui index 68752b17..eaee5541 100644 --- a/docker/Dockerfile.gui +++ b/docker/Dockerfile.gui @@ -84,8 +84,8 @@ HOME="/config" \ DOCKER_MODS=linuxserver/mods:universal-stdout-logs|linuxserver/mods:universal-cron \ DEFAULT_WORKSPACE=/config/ytdl-sub-configs \ CRON_SCRIPT="/config/ytdl-sub-configs/cron" \ -CRON_WRAPPER_SCRIPT="/config/ytdl-sub-configs/.cron_wrapper" \ -LOGS_TO_STDOUT=/config/ytdl-sub-configs/.cron.log \ +CRON_WRAPPER_SCRIPT="/config/.cron_wrapper" \ +LOGS_TO_STDOUT=/config/.cron.log \ LSIO_FIRST_PARTY=false VOLUME /config \ No newline at end of file diff --git a/docker/root/custom-cont-init.d/defaults b/docker/root/custom-cont-init.d/defaults index 3926dd4b..e07ed6a8 100644 --- a/docker/root/custom-cont-init.d/defaults +++ b/docker/root/custom-cont-init.d/defaults @@ -39,7 +39,7 @@ if [ "$CRON_SCHEDULE" != "" ] ; then CRON_SCHEDULE_CLEAN="${CRON_SCHEDULE_CLEAN//\'/}" echo "# min hour day month weekday command" > /config/crontabs/abc - echo "$CRON_SCHEDULE_CLEAN $DEFAULT_WORKSPACE/.cron_wrapper" >> /config/crontabs/abc + echo "$CRON_SCHEDULE_CLEAN $CRON_WRAPPER_SCRIPT" >> /config/crontabs/abc chmod +x "$CRON_SCRIPT" chown abc:abc "$CRON_SCRIPT" diff --git a/docs/source/guides/getting_started/automating_downloads.rst b/docs/source/guides/getting_started/automating_downloads.rst index 392c8ebb..a4a668be 100644 --- a/docs/source/guides/getting_started/automating_downloads.rst +++ b/docs/source/guides/getting_started/automating_downloads.rst @@ -22,12 +22,12 @@ ENV variables to your docker setup. services: ytdl-sub: environment: - - CRON_SCHEDULE="0 */6 * * *" - - CRON_RUN_ON_START=false + - CRON_SCHEDULE="0 */6 * * *" + - CRON_RUN_ON_START=false - ``CRON_SCHEDULE`` follows the standard `cron scheduling syntax`_. The above value will run the script once every 6 hours. -- ``CRON_RUN_ON_START`` toggles whether to run your cron script on container start. +- ``CRON_RUN_ON_START`` toggles whether to run your cron script on container start in addition to the cron schedule. The cron script will reside in the main directory with the file name ``cron``. Cron logs should show when viewing the Docker logs.