From 36f0806abb76a763eda03bebcbe61dd276f03777 Mon Sep 17 00:00:00 2001 From: G Date: Mon, 11 Mar 2024 21:01:41 +0330 Subject: [PATCH] schedule temp time --- src/features/schedule/schedule.service.ts | 43 +++++++++++------------ 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/src/features/schedule/schedule.service.ts b/src/features/schedule/schedule.service.ts index 0f7163e16..9b038b619 100644 --- a/src/features/schedule/schedule.service.ts +++ b/src/features/schedule/schedule.service.ts @@ -16,7 +16,7 @@ export class ScheduleService { ) {} private readonly logger = new Logger(ScheduleService.name); - async completePays() { + async completePays() { const father = await this.familyService.getFamilyRoleCompletePay( VirtualFamilyRole.FATHER, 0, @@ -127,27 +127,26 @@ export class ScheduleService { } } // ERROR [Scheduler] ServerError: Can't send mail - all recipients were rejected: 550 No such user here - @Cron(' 00 00 19 * * Mon', { - name: 'MonthlyCampaigns try At 13:00 on Thursdays.', // we try every week and only send to those who did not receive (because their child have no needs, etc.) - timeZone: 'Asia/Tehran', - }) - async handleSummaryMailCron() { - const farsiDay = persianDay(new Date()); - // if (farsiDay > 20) { - // this.logger.warn( - // `We are near the end of this month let's skip one more week`, - // ); - // return; - // } - this.logger.debug('Sending user Campaigns...'); - // ############## BE CAREFUL ################# - if (process.env.NODE_ENV === 'production') { - this.logger.debug( - 'Sending user Campaigns at 01:00 PM, only on Thursdays', - ); - await this.campaignService.sendUserMonthlyCampaigns(); - } - } + // @Cron(' 00 00 13 * * Thu', { + // name: 'MonthlyCampaigns try At 13:00 on Thursdays.', // we try every week and only send to those who did not receive (because their child have no needs, etc.) + // timeZone: 'Asia/Tehran', + // }) + // async handleSummaryMailCron() { + // const farsiDay = persianDay(new Date()); + // if (farsiDay > 20) { + // this.logger.warn( + // `We are near the end of this month let's skip one more week`, + // ); + // return; + // } + // // ############## BE CAREFUL ################# + // if (process.env.NODE_ENV === 'production') { + // this.logger.debug( + // 'Sending user Campaigns at 01:00 PM, only on Thursdays', + // ); + // await this.campaignService.sendUserMonthlyCampaigns(); + // } + // } @Cron('30 8 * * Sat', { name: 'Reminders At 08:30 on Saturday.',