Skip to content

Commit

Permalink
schedule temp time
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsan-g committed Mar 11, 2024
1 parent ed12e4c commit 26fc261
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/features/schedule/schedule.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -127,18 +127,19 @@ export class ScheduleService {
}
}
// ERROR [Scheduler] ServerError: Can't send mail - all recipients were rejected: 550 <[email protected]> No such user here
@Cron(' 00 00 13 * * Thu', {
@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;
}
// 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(
Expand Down

0 comments on commit 26fc261

Please sign in to comment.