ytdl-sub/docs/source
Jesse Bannon 51c134a036
[DOCKER] Simplify cron (#1184)
Drastically simplifies setting up cron within ytdl-sub. Below is the documentation which is available in readthedocs, and a section on how to migrate from the old way to this.

## New Cron Documentation
Cron is preconfigured in every ytdl-sub docker container. Enable by adding the following ENV variables to your docker setup.

```
services:
  ytdl-sub:
    environment:
    - CRON_SCHEDULE="0 */6 * * *"
    - CRON_RUN_ON_START=false
```  
- CRON_SCHEDULE follows the standard [cron scheduling syntax](https://crontab.guru/#0_*/6_*_*_*). 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.

The cron script will reside in the main directory with the file name `cron`. Cron logs should show when viewing the Docker logs.

## Migrating Existing Cron Setup
Containers' cron files will remain intact until you add the `CRON_SCHEDULE` variable. Once you add that with your preferred schedule, it will write that value to /config/crontabs/abc and create a new file `cron` within your working directory. Simply copy everything from your existing `run_cron` script into `cron`.

If you have the ENV variable `DOCKER_MODS` in your docker-compose, remove it. It is now included by default. Not removing this will prevent cron logs from showing in your docker container logs.
2025-03-15 15:47:03 -07:00
..
_static [DOCS] Tooling to auto-generate custom sphinx docs (#849) 2023-12-28 22:39:59 -08:00
config_reference [DOCS] Rewrite getting started guide (#1129) 2024-12-21 09:13:09 -08:00
faq [FEATURE] Filter Keywords prebuilt preset (#1086) 2024-10-05 01:03:52 -07:00
guides [DOCKER] Simplify cron (#1184) 2025-03-15 15:47:03 -07:00
prebuilt_presets [FEATURE] Toggleable keyword evaluation behavior (#1130) 2024-11-26 08:20:42 -08:00
conf.py [DOCS] Various doc cleanups (#928) 2024-02-17 08:53:06 -08:00
deprecation_notices.rst [DOCS] Rewrite getting started guide (#1129) 2024-12-21 09:13:09 -08:00
index.rst [DOCS] Update links to reflect doc-upgrade (#858) 2023-12-27 11:07:11 -08:00
introduction.rst [DOCS] Begin complete overhaul of readthedocs (#847) 2023-12-27 10:27:40 -08:00
requirements.txt [BACKEND] Remove old format for video_tags, music_tags, download_strategy (#899) 2024-01-15 00:04:32 -08:00
usage.rst [DOCS] Update Usage page (#883) 2024-01-08 16:20:08 -08:00