Example on how to set up Cron

This commit is contained in:
Jacopo
2023-02-23 11:02:39 +01:00
parent 7ad416f029
commit eb46d0507e

View File

@@ -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. 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 ### 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: 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: