From e1cb23a9a67a76bbcf197876f05f9ae576b09e95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 27 Oct 2025 16:29:25 +0100 Subject: [PATCH] Add chill-send-sms systemd service and timer Introduced new systemd `chill-send-sms@.service` and `chill-send-sms@.timer` to schedule and execute SMS sending feature. Updated Ansible tasks to manage these units. --- tasks/main.yml | 2 ++ templates/systemd/chill-send-sms@.service | 9 +++++++++ templates/systemd/chill-send-sms@.timer | 10 ++++++++++ 3 files changed, 21 insertions(+) create mode 100644 templates/systemd/chill-send-sms@.service create mode 100644 templates/systemd/chill-send-sms@.timer 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