Skip to content

Commit 440e37c

Browse files
schedule cron triggers and add expressions that will keep some jobs disabled
1 parent 0890814 commit 440e37c

File tree

1 file changed

+11
-11
lines changed
  • infrastructure/modules/container-apps

1 file changed

+11
-11
lines changed

infrastructure/modules/container-apps/jobs.tf

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ locals {
99
job_container_args = "store_mesh_messages"
1010
}
1111
create_appointments = {
12-
cron_expression = "*/30 * * * *"
12+
cron_expression = "0 0 5 31 2 ?"
1313
environment_variables = {
1414
BLOB_CONTAINER_NAME = "notifications-mesh-data"
1515
}
1616
job_short_name = "cap"
1717
job_container_args = "create_appointments"
1818
}
1919
send_message_batch = {
20-
cron_expression = "0 11,13,15 * * *"
20+
cron_expression = "0 0 5 31 2 ?"
2121
environment_variables = {
2222
API_OAUTH_TOKEN_URL = var.api_oauth_token_url
2323
NHS_NOTIFY_API_MESSAGE_BATCH_URL = var.nhs_notify_api_message_batch_url
@@ -27,7 +27,7 @@ locals {
2727
job_container_args = "send_message_batch"
2828
}
2929
retry_failed_message_batch = {
30-
cron_expression = "*/30 * * * *"
30+
cron_expression = "0 0 5 31 2 ?"
3131
environment_variables = {
3232
API_OAUTH_TOKEN_URL = var.api_oauth_token_url
3333
NHS_NOTIFY_API_MESSAGE_BATCH_URL = var.nhs_notify_api_message_batch_url
@@ -37,23 +37,23 @@ locals {
3737
job_container_args = "retry_failed_message_batch"
3838
}
3939
save_message_status = {
40-
cron_expression = "*/30 * * * *"
40+
cron_expression = "0 0 5 31 2 ?"
4141
environment_variables = {
4242
STATUS_UPDATES_QUEUE_NAME = "notifications-message-status-updates"
4343
}
4444
job_short_name = "sms"
4545
job_container_args = "save_message_status"
4646
}
4747
create_failures_report = {
48-
cron_expression = "30 23 * * *"
48+
cron_expression = "0 0 5 31 2 ?"
4949
environment_variables = {
5050
BLOB_CONTAINER_NAME = "notifications-reports"
5151
}
5252
job_short_name = "crf"
5353
job_container_args = "create_report"
5454
}
5555
create_aggregate_report = {
56-
cron_expression = "45 23 * * *"
56+
cron_expression = "0 0 5 31 2 ?"
5757
environment_variables = {
5858
BLOB_CONTAINER_NAME = "notifications-reports"
5959
}
@@ -136,9 +136,9 @@ module "scheduled_jobs" {
136136
module.queue_storage_role_assignment
137137
]
138138

139-
# schedule_trigger_config {
140-
# cron_expression = each.value.cron_expression
141-
# parallelism = 1
142-
# replica_completion_count = 1
143-
#}
139+
schedule_trigger_config {
140+
cron_expression = each.value.cron_expression
141+
parallelism = 1
142+
replica_completion_count = 1
143+
}
144144
}

0 commit comments

Comments
 (0)