From eb46d0507e8536fd5d79cf2c883a10bc3e18ac64 Mon Sep 17 00:00:00 2001 From: Jacopo Date: Thu, 23 Feb 2023 11:02:39 +0100 Subject: [PATCH] Example on how to set up Cron --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index ea64ce00..a9265f8c 100644 --- a/README.md +++ b/README.md @@ -330,6 +330,21 @@ accessories: Now run `mrsk accessory start mysql` to start the MySQL server on 1.1.1.3. See `mrsk accessory` for all the commands possible. +### Using Cron + +You can use a specific container to run your Cron jobs: + +```yaml +servers: + cron: + hosts: + - 192.168.0.1 + cmd: + bash -c "cat config/crontab | crontab - && cron -f" +``` + +This assumes the Cron settings are stored in `config/crontab`. + ### Using a generated .env file If you're using a centralized secret store, like 1Password, you can create `.env.erb` as a template which looks up the secrets. Example of a .env.erb file: