diff --git a/src/cohort/cron/cron.service.ts b/src/cohort/cron/cron.service.ts index b55225e..d3f0f4c 100644 --- a/src/cohort/cron/cron.service.ts +++ b/src/cohort/cron/cron.service.ts @@ -24,7 +24,7 @@ export class CronService { async getOldActiveCohorts() { try { const dateThreshold = new Date(); - dateThreshold.setDate(dateThreshold.getDate() - 30); + dateThreshold.setDate(dateThreshold.getDate() - parseInt(process.env.COHORT_EXPIRY_DAYS)); console.log(dateThreshold) const cohorts = await this.cohortRepository.find({