From 3add31496f3b5eb41c293ac25a08e034c25c767e Mon Sep 17 00:00:00 2001 From: Prakhar Pratyush Date: Fri, 22 Mar 2024 13:42:36 +0530 Subject: [PATCH] puppet: Add a daily cron-job to send zulip update announcements. A daily cron job is configured to run the 'send_zulip_update_announcements' management command. --- puppet/zulip/files/cron.d/send_zulip_update_announcements | 6 ++++++ puppet/zulip/manifests/app_frontend_once.pp | 8 ++++++++ 2 files changed, 14 insertions(+) create mode 100644 puppet/zulip/files/cron.d/send_zulip_update_announcements diff --git a/puppet/zulip/files/cron.d/send_zulip_update_announcements b/puppet/zulip/files/cron.d/send_zulip_update_announcements new file mode 100644 index 0000000000..902f0df2e0 --- /dev/null +++ b/puppet/zulip/files/cron.d/send_zulip_update_announcements @@ -0,0 +1,6 @@ +SHELL=/bin/bash +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +USER=zulip + +# Cron job to send zulip update announcements hourly, if there are any. +47 * * * * zulip /home/zulip/deployments/current/manage.py send_zulip_update_announcements diff --git a/puppet/zulip/manifests/app_frontend_once.pp b/puppet/zulip/manifests/app_frontend_once.pp index 148015d15e..b63b80f62f 100644 --- a/puppet/zulip/manifests/app_frontend_once.pp +++ b/puppet/zulip/manifests/app_frontend_once.pp @@ -74,4 +74,12 @@ class zulip::app_frontend_once { mode => '0644', source => 'puppet:///modules/zulip/cron.d/clearsessions', } + + file { '/etc/cron.d/send_zulip_update_announcements': + ensure => file, + owner => 'root', + group => 'root', + mode => '0644', + source => 'puppet:///modules/zulip/cron.d/send_zulip_update_announcements', + } }