diff --git a/tasks/main.yml b/tasks/main.yml index 8974434..6151e61 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -72,6 +72,8 @@ loop: - chill-cronjob@.service - chill-cronjob@.timer + - chill-send-sms@.service + - chill-send-sms@.timer loop_control: loop_var: file diff --git a/templates/systemd/chill-send-sms@.service b/templates/systemd/chill-send-sms@.service new file mode 100644 index 0000000..25d4283 --- /dev/null +++ b/templates/systemd/chill-send-sms@.service @@ -0,0 +1,9 @@ +[Unit] +Description=Execute send-short-messages for chill with environment %i + +[Service] +User={{ as_user }} +ExecStart=/usr/bin/docker compose --file {{ install_dir }}/%i/compose.yaml run cron bin/console chill:calendar:send-short-messages +Type=simple +# execute maximum 30 minutes +RuntimeMaxSec=1800 \ No newline at end of file diff --git a/templates/systemd/chill-send-sms@.timer b/templates/systemd/chill-send-sms@.timer new file mode 100644 index 0000000..54547d7 --- /dev/null +++ b/templates/systemd/chill-send-sms@.timer @@ -0,0 +1,10 @@ +[Unit] +Description=Run chill send-sms + +[Timer] +Unit=chill-send-sms@%i.service +OnCalendar=*-*-* 7-18:0:00 +RandomizedDelaySec=60 + +[Install] +WantedBy=multi-user.target \ No newline at end of file