From 19c5333b0283528bd467559fe7ac69751367890d Mon Sep 17 00:00:00 2001 From: Shamzic Date: Fri, 10 Nov 2023 20:21:01 +0100 Subject: [PATCH 1/4] feat: ajoute le cron pour l'envoi du sondage initial par sms --- roles/bootstrap/tasks/setup_cron.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/roles/bootstrap/tasks/setup_cron.yaml b/roles/bootstrap/tasks/setup_cron.yaml index f2fc466..ef137e1 100644 --- a/roles/bootstrap/tasks/setup_cron.yaml +++ b/roles/bootstrap/tasks/setup_cron.yaml @@ -20,6 +20,17 @@ {{ envvar_prefix }} /usr/bin/node ./dist-server/tools/email-sending-tool.js send initial-survey --multiple 1000 >> /var/log/{{ server_user_name }}/{{ item.name }}_emails.log 2>&1) +- name: Add a cron job to send initial survey by sms + become_user: "{{ server_user_name }}" + ansible.builtin.cron: + name: send initial survey sms for {{ item.name }} + minute: "8" + hour: "4" + job: >- + (cd {{ repository_folder }} && + {{ envvar_prefix }} /usr/bin/node + ./dist-server/backend/lib/sms-sending-tool.js send initial-survey + --multiple 1000 >> /var/log/{{ server_user_name }}/{{ item.name }}_sms.log 2>&1) - name: Add a cron job to anonymize Simulation and Followup data collections become_user: "{{ server_user_name }}" ansible.builtin.cron: From f3e2f82d16fa0a05965316d0facd8274838e7617 Mon Sep 17 00:00:00 2001 From: Simon Hamery Date: Thu, 16 Nov 2023 15:45:19 +0100 Subject: [PATCH 2/4] Update setup_cron.yaml --- roles/bootstrap/tasks/setup_cron.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/bootstrap/tasks/setup_cron.yaml b/roles/bootstrap/tasks/setup_cron.yaml index ef137e1..e6e5b35 100644 --- a/roles/bootstrap/tasks/setup_cron.yaml +++ b/roles/bootstrap/tasks/setup_cron.yaml @@ -29,7 +29,7 @@ job: >- (cd {{ repository_folder }} && {{ envvar_prefix }} /usr/bin/node - ./dist-server/backend/lib/sms-sending-tool.js send initial-survey + ./dist-server/tools/sms-sending-tool.js send initial-survey --multiple 1000 >> /var/log/{{ server_user_name }}/{{ item.name }}_sms.log 2>&1) - name: Add a cron job to anonymize Simulation and Followup data collections become_user: "{{ server_user_name }}" From f4b1cdbe838ae4ec2e1fae8308e8c544d9f96677 Mon Sep 17 00:00:00 2001 From: Shamzic Date: Thu, 23 Nov 2023 12:02:46 +0100 Subject: [PATCH 3/4] =?UTF-8?q?refactor:=20envoi=20des=20sms=20programm?= =?UTF-8?q?=C3=A9=20=C3=A0=2017h?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- roles/bootstrap/tasks/setup_cron.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/bootstrap/tasks/setup_cron.yaml b/roles/bootstrap/tasks/setup_cron.yaml index e6e5b35..43fb53b 100644 --- a/roles/bootstrap/tasks/setup_cron.yaml +++ b/roles/bootstrap/tasks/setup_cron.yaml @@ -25,7 +25,7 @@ ansible.builtin.cron: name: send initial survey sms for {{ item.name }} minute: "8" - hour: "4" + hour: "17" job: >- (cd {{ repository_folder }} && {{ envvar_prefix }} /usr/bin/node From 478f68b68cc6af4c5332ae12a22a0f9a97e80692 Mon Sep 17 00:00:00 2001 From: Simon Hamery Date: Tue, 5 Dec 2023 14:52:46 +0100 Subject: [PATCH 4/4] =?UTF-8?q?chore:=20fixe=20=C3=A0=20100=20la=20limite?= =?UTF-8?q?=20quotidienne=20de=20sms=20de=20sondage=20envoy=C3=A9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- roles/bootstrap/tasks/setup_cron.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/bootstrap/tasks/setup_cron.yaml b/roles/bootstrap/tasks/setup_cron.yaml index 43fb53b..7a2bdc8 100644 --- a/roles/bootstrap/tasks/setup_cron.yaml +++ b/roles/bootstrap/tasks/setup_cron.yaml @@ -30,7 +30,7 @@ (cd {{ repository_folder }} && {{ envvar_prefix }} /usr/bin/node ./dist-server/tools/sms-sending-tool.js send initial-survey - --multiple 1000 >> /var/log/{{ server_user_name }}/{{ item.name }}_sms.log 2>&1) + --multiple 100 >> /var/log/{{ server_user_name }}/{{ item.name }}_sms.log 2>&1) - name: Add a cron job to anonymize Simulation and Followup data collections become_user: "{{ server_user_name }}" ansible.builtin.cron: