set up cronjob and timer

This commit is contained in:
2024-12-30 13:19:45 +01:00
parent cf62dcc707
commit 07a9f4bf4d
6 changed files with 51 additions and 5 deletions

View File

@@ -0,0 +1,9 @@
[Unit]
Description=Execute cron job for chill with environment %i
[Service]
User={{ as_user }}
ExecStart=/usr/bin/docker compose --file {{ install_dir }}/%i/compose.yaml up cron
Type=simple
# execute maximum 30 minutes
RuntimeMaxSec=1800

View File

@@ -0,0 +1,10 @@
[Unit]
Description=Run chill cron-jobs
[Timer]
Unit=chill-cronjob@%i.service
OnCalendar=*-*-* *:0,15,30,45:00
RandomizedDelaySec=60
[Install]
WantedBy=multi-user.target