From 9eedf6f5037d65e85493b38f309150e0ec993a4f Mon Sep 17 00:00:00 2001 From: Robert Dailey Date: Wed, 15 Jan 2020 09:06:56 -0600 Subject: [PATCH] README: Multiple custom task script support Explain in the README that multiple shell scripts are supported for custom cron tasks. --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 03e9957..f214362 100644 --- a/README.md +++ b/README.md @@ -120,6 +120,21 @@ in addition to the default `cron.php` task. To add your custom tasks, follow the 3. Recreate the container. Your script will now execute in the Nextcloud container at a regular interval. +Multiple scripts are supported. The container will search for all `*.sh` files inside the +`/cron-scripts` directory. To make supporting multiple scripts easier, you can also map a directory +on the host to the `/cron-scripts` directory in the container: + +```yml +services: + cron: + image: rcdailey/nextcloud-cronjob + volumes: + - ./my-scripts:/cron-scripts:ro +``` + +As an optional safety measure, mount the directory or files as read-only (via the `:ro` at the end). +The container should not modify the files, but it doesn't hurt to be explicitly strict. + ### Notes * All cron task shell scripts run at the same interval defined by `NEXTCLOUD_CRON_MINUTE_INTERVAL`.