From b6b85886e8b0d7d52daf2acfe960a2c467f9ec05 Mon Sep 17 00:00:00 2001 From: Adrien Gallou Date: Sat, 31 Aug 2024 16:37:08 +0200 Subject: [PATCH 1/7] ajout du script de deduplication des crons --- clevercloud/scripts/deduplicate_cron.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 clevercloud/scripts/deduplicate_cron.sh diff --git a/clevercloud/scripts/deduplicate_cron.sh b/clevercloud/scripts/deduplicate_cron.sh new file mode 100755 index 000000000..e1d43e7ef --- /dev/null +++ b/clevercloud/scripts/deduplicate_cron.sh @@ -0,0 +1,7 @@ +if [[ "$INSTANCE_NUMBER" != "0" ]]; then + echo "Instance number is ${INSTANCE_NUMBER}. Stop here." + exit 0 +fi + +$@ + From 195482fc45cf1837e93ebfce08223a2787d4a611 Mon Sep 17 00:00:00 2001 From: Adrien Gallou Date: Sat, 31 Aug 2024 16:41:49 +0200 Subject: [PATCH 2/7] =?UTF-8?q?ajout=20d'une=20premi=C3=A8re=20cron=20:=20?= =?UTF-8?q?la=20mise=20=C3=A0=20jour=20de=20planete=20php?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- clevercloud/cron.json | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 clevercloud/cron.json diff --git a/clevercloud/cron.json b/clevercloud/cron.json new file mode 100644 index 000000000..ab3ac4bd7 --- /dev/null +++ b/clevercloud/cron.json @@ -0,0 +1,3 @@ +[ + "02 * * * * $ROOT/clevercloud/scripts/deduplicate_cron.sh $ROOT/htdocs/robots/planete/explorateur.php" +] From 36854ae79a8ad7653ab2914c05846b050bccb792 Mon Sep 17 00:00:00 2001 From: Adrien Gallou Date: Sat, 31 Aug 2024 17:28:05 +0200 Subject: [PATCH 3/7] =?UTF-8?q?afin=20de=20bien=20r=C3=A9cup=C3=A9rer=20le?= =?UTF-8?q?s=20variables=20d'environnement=20il=20faut=20bien=20passer=20l?= =?UTF-8?q?'option=20-l?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- clevercloud/scripts/deduplicate_cron.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clevercloud/scripts/deduplicate_cron.sh b/clevercloud/scripts/deduplicate_cron.sh index e1d43e7ef..193db6b0d 100755 --- a/clevercloud/scripts/deduplicate_cron.sh +++ b/clevercloud/scripts/deduplicate_cron.sh @@ -1,3 +1,5 @@ +#! /bin/bash -l + if [[ "$INSTANCE_NUMBER" != "0" ]]; then echo "Instance number is ${INSTANCE_NUMBER}. Stop here." exit 0 From 2f7e511e53007f232be3d8224d02c234f2bc683f Mon Sep 17 00:00:00 2001 From: Adrien Gallou Date: Sat, 31 Aug 2024 18:05:06 +0200 Subject: [PATCH 4/7] on corrige le lancement de la cron d'explorateur --- clevercloud/cron.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clevercloud/cron.json b/clevercloud/cron.json index ab3ac4bd7..91dc0610d 100644 --- a/clevercloud/cron.json +++ b/clevercloud/cron.json @@ -1,3 +1,3 @@ [ - "02 * * * * $ROOT/clevercloud/scripts/deduplicate_cron.sh $ROOT/htdocs/robots/planete/explorateur.php" + "02 * * * * $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/htdocs/robots/planete/explorateur.php" ] From 6e40f60a23ffb2efa34f4ce2d2f9ee0e1c7d7efa Mon Sep 17 00:00:00 2001 From: Adrien Gallou Date: Sat, 31 Aug 2024 22:50:17 +0200 Subject: [PATCH 5/7] =?UTF-8?q?reprise=20des=20crons=20configur=C3=A9es=20?= =?UTF-8?q?en=20prod?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- clevercloud/cron.json | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/clevercloud/cron.json b/clevercloud/cron.json index 91dc0610d..310355b23 100644 --- a/clevercloud/cron.json +++ b/clevercloud/cron.json @@ -1,3 +1,15 @@ [ - "02 * * * * $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/htdocs/robots/planete/explorateur.php" + "2 * * * * $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/htdocs/robots/planete/explorateur.php", + "0 7 * * * $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod subscription:reminder", + "0 1 * * * $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod mailchimp:update-members", + "0 0 * * * $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod indexing:meetups --run-scraping", + "0 21 * * 1,3,6 $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod general-meeting-notification", + "0 21 * * 2,4 $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod ticket-stats-notification", + "0 3 * * * $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod groups:update-members", + "0 8 * * 1,3,5 $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod cfp-stats-notification", + "0 1 * * * $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod sync-techletter -vv", + "0 9 * * * $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod sync-members -vv", + "55 17 * * * $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod slack-member-notification", + "0 * * * * $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod update-user-state", + "32 * * * * $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod update-company-member-state" ] From 8ac7799014c762efece9bae914c023066bd9fd1f Mon Sep 17 00:00:00 2001 From: Adrien Gallou Date: Sun, 1 Sep 2024 10:53:04 +0200 Subject: [PATCH 6/7] la commande groups:update-members n'existe plus --- clevercloud/cron.json | 1 - 1 file changed, 1 deletion(-) diff --git a/clevercloud/cron.json b/clevercloud/cron.json index 310355b23..4c496e383 100644 --- a/clevercloud/cron.json +++ b/clevercloud/cron.json @@ -5,7 +5,6 @@ "0 0 * * * $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod indexing:meetups --run-scraping", "0 21 * * 1,3,6 $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod general-meeting-notification", "0 21 * * 2,4 $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod ticket-stats-notification", - "0 3 * * * $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod groups:update-members", "0 8 * * 1,3,5 $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod cfp-stats-notification", "0 1 * * * $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod sync-techletter -vv", "0 9 * * * $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod sync-members -vv", From 602a5a6574624f0d7857540f6ea63f8c62663940 Mon Sep 17 00:00:00 2001 From: Adrien Gallou Date: Sun, 1 Sep 2024 10:55:11 +0200 Subject: [PATCH 7/7] on passe les crons en UTC --- clevercloud/cron.json | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/clevercloud/cron.json b/clevercloud/cron.json index 4c496e383..5a3dbb04e 100644 --- a/clevercloud/cron.json +++ b/clevercloud/cron.json @@ -1,14 +1,14 @@ [ - "2 * * * * $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/htdocs/robots/planete/explorateur.php", - "0 7 * * * $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod subscription:reminder", - "0 1 * * * $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod mailchimp:update-members", - "0 0 * * * $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod indexing:meetups --run-scraping", - "0 21 * * 1,3,6 $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod general-meeting-notification", - "0 21 * * 2,4 $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod ticket-stats-notification", - "0 8 * * 1,3,5 $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod cfp-stats-notification", - "0 1 * * * $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod sync-techletter -vv", - "0 9 * * * $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod sync-members -vv", - "55 17 * * * $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod slack-member-notification", + "0 * * * * $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/htdocs/robots/planete/explorateur.php", + "0 5 * * * $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod subscription:reminder", + "0 23 * * * $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod mailchimp:update-members", + "0 22 * * * $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod indexing:meetups --run-scraping", + "0 19 * * 1,3,6 $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod general-meeting-notification", + "0 19 * * 2,4 $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod ticket-stats-notification", + "0 6 * * 1,3,5 $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod cfp-stats-notification", + "0 23 * * * $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod sync-techletter -vv", + "0 7 * * * $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod sync-members -vv", + "55 15 * * * $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod slack-member-notification", "0 * * * * $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod update-user-state", "32 * * * * $ROOT/clevercloud/scripts/deduplicate_cron.sh /usr/bin/php $ROOT/bin/console --env=prod update-company-member-state" ]