Skip to content

Commit

Permalink
Correct paths
Browse files Browse the repository at this point in the history
  • Loading branch information
dsgnr committed Oct 26, 2024
1 parent e8e4c0a commit f6a7765
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions docs/source/guides/getting_started/automating_downloads.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Docker and Unraid
docker compose restart
The script that will execute automatically is located at ``/config/ytdl-sub-configs/run_cron``.
The script that will execute automatically is located at ``/config/run_cron``.

Access your container from the terminal by running:

Expand All @@ -93,26 +93,26 @@ Docker and Unraid

.. code-block:: shell
echo '#!/bin/bash' > /config/ytdl-sub-configs/run_cron
echo "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" >> /config/ytdl-sub-configs/run_cron
echo "echo 'Cron started, running ytdl-sub...'" >> /config/ytdl-sub-configs/run_cron
echo "cd /config/ytdl-sub-configs" >> /config/ytdl-sub-configs/run_cron
echo "ytdl-sub --config=config.yaml sub subscriptions.yaml" >> /config/ytdl-sub-configs/run_cron
chmod +x /config/ytdl-sub-configs/run_cron
chown abc:abc /config/ytdl-sub-configs/run_cron
echo '#!/bin/bash' > /config/run_cron
echo "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" >> /config/run_cron
echo "echo 'Cron started, running ytdl-sub...'" >> /config/run_cron
echo "cd /config" >> /config/run_cron
echo "ytdl-sub --config=config.yaml sub subscriptions.yaml" >> /config/run_cron
chmod +x /config/run_cron
chown abc:abc /config/run_cron
You can test the newly created script by running:

.. code-block::
/config/ytdl-sub-configs/run_cron
/config/run_cron
To create the cron definition, run the following command:

.. code-block:: shell
echo "# min hour day month weekday command" > /config/crontabs/abc
echo " 0 */6 * * * /config/ytdl-sub-configs/run_cron" >> /config/crontabs/abc
echo " 0 */6 * * * /config/run_cron" >> /config/crontabs/abc
This will run the script every 6 hours. To run every hour, change ``*/6`` to ``*/1``, or to run once a day, change the same value to the hour (in 24hr format) that you want it to run at. See the `cron tab manpage`_ for more options.

Expand All @@ -124,7 +124,7 @@ Linux
.. code-block:: shell
crontab -e
0 */6 * * * /config/ytdl-sub-configs/run_cron
0 */6 * * * /config/run_cron
Expand All @@ -137,4 +137,4 @@ To be tested (please contact code owner or join the discord server if you can te

.. code-block:: powershell
ytdl-sub.exe --config \path\to\config\config.yaml sub \path\to\config\subscriptions.yaml
ytdl-sub.exe --config \path\to\config\config.yaml sub \path\to\config\subscriptions.yaml

0 comments on commit f6a7765

Please sign in to comment.