- 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.
12 lines
427 B
TypeScript
12 lines
427 B
TypeScript
import {startDailyDigestJob} from "./daily-digest-job";
|
|
import {startNotificationsJob} from "./notifications-job";
|
|
import {startProjectDigestJob} from "./project-digest-job";
|
|
import {startRecurringTasksJob} from "./recurring-tasks";
|
|
|
|
export function startCronJobs() {
|
|
startNotificationsJob();
|
|
startDailyDigestJob();
|
|
startProjectDigestJob();
|
|
if (process.env.ENABLE_RECURRING_JOBS === "true") startRecurringTasksJob();
|
|
}
|