docs(docker): Document image environment footgun

From [PR
feedback](https://github.com/jmbannon/ytdl-sub/pull/1321#discussion_r2320515419).
This commit is contained in:
Ross Patterson 2025-09-04 01:23:06 -07:00
parent e0032a8e64
commit 23b5be713f
No known key found for this signature in database
GPG key ID: 2EFF7CCE6828E359

View file

@ -32,6 +32,24 @@ The container cron wrapper script will write output from the cron job to
...`` that file so you can monitor the cron job in the container's output and thus also
in the Docker logs.
You may also set the ``CRON_RUN_ON_START`` environment variable to ``true`` to have the
image run your cron script whenever the container starts in addition to the cron
schedule.
.. warning::
Using ``CRON_RUN_ON_START`` is not recommended because it may cause your cron script
to run too often and may trigger throttles and bans. When enabled, your cron script
will run *whenever* the container starts including when the host reboots, when ``#
dockerd`` is upgraded, when a new image is pulled, when something applies Compose
changes, etc.. This may result in running ``ytdl-sub`` right before or after the next
cron scheduled run or even at the same time on top of each other. Instead, run your
cron script manually inside the running container as needed:
.. code-block:: console
docker compose exec ytdl-sub bash /config/ytdl-sub-configs/cron
.. _linux-setup: