From 0cb0efe43e50c06380fb13ad0242e86d41ecaa94 Mon Sep 17 00:00:00 2001 From: chamiakJ Date: Wed, 21 May 2025 11:28:10 +0530 Subject: [PATCH] feat(cron-jobs): conditionally enable recurring tasks based on environment variable - Updated the cron job initialization to start recurring tasks only if the ENABLE_RECURRING_JOBS environment variable is set to "true". This allows for more flexible job management based on deployment configurations. --- worklenz-backend/src/cron_jobs/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worklenz-backend/src/cron_jobs/index.ts b/worklenz-backend/src/cron_jobs/index.ts index 20bd4f62..108a76f2 100644 --- a/worklenz-backend/src/cron_jobs/index.ts +++ b/worklenz-backend/src/cron_jobs/index.ts @@ -7,5 +7,5 @@ export function startCronJobs() { startNotificationsJob(); startDailyDigestJob(); startProjectDigestJob(); - startRecurringTasksJob(); + if (process.env.ENABLE_RECURRING_JOBS === "true") startRecurringTasksJob(); }