Skip to content

Commit

Permalink
Add to cron
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn committed Aug 21, 2023
1 parent bfbf9ce commit 4ff499b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions clevercloud/cron.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"40 7 * * 1 $ROOT/clevercloud/siaes_update_api_zrr_fields.sh",
"0 7 * * 2 $ROOT/clevercloud/siaes_send_completion_reminder_emails.sh",
"0 8 * * * $ROOT/clevercloud/siaes_send_user_request_reminder_emails.sh",
"30 8 * * * $ROOT/clevercloud/tenders_send_author_transactioned_question_emails.sh",
"0 9 * * * $ROOT/clevercloud/tenders_send_siae_contacted_reminder_emails.sh",
"10 9 * * * $ROOT/clevercloud/tenders_send_siae_interested_reminder_emails.sh",
"20 9 * * * $ROOT/clevercloud/tenders_send_author_incremental.sh"
Expand Down
22 changes: 22 additions & 0 deletions clevercloud/tenders_send_author_transactioned_question_emails.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash -l

# Send email for tender transactioned question to author

# Do not run if this env var is not set:
if [[ -z "$CRON_SEND_TENDER_AUTHOR_TRANSACTIONED_QUESTION_ENABLED" ]]; then
echo "CRON_SEND_TENDER_AUTHOR_TRANSACTIONED_QUESTION_ENABLED not set. Exiting..."
exit 0
fi

# About clever cloud cronjobs:
# https://www.clever-cloud.com/doc/tools/crons/

if [[ "$INSTANCE_NUMBER" != "0" ]]; then
echo "Instance number is ${INSTANCE_NUMBER}. Stop here."
exit 0
fi

# $APP_HOME is set by default by clever cloud.
cd $APP_HOME

django-admin send_author_transactioned_question_emails

0 comments on commit 4ff499b

Please sign in to comment.