diff --git a/clevercloud/cron.json b/clevercloud/cron.json new file mode 100644 index 000000000..5a3dbb04e --- /dev/null +++ b/clevercloud/cron.json @@ -0,0 +1,14 @@ +[ + "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" +] diff --git a/clevercloud/scripts/deduplicate_cron.sh b/clevercloud/scripts/deduplicate_cron.sh new file mode 100755 index 000000000..193db6b0d --- /dev/null +++ b/clevercloud/scripts/deduplicate_cron.sh @@ -0,0 +1,9 @@ +#! /bin/bash -l + +if [[ "$INSTANCE_NUMBER" != "0" ]]; then + echo "Instance number is ${INSTANCE_NUMBER}. Stop here." + exit 0 +fi + +$@ +