From 34b27d529b9ba0b7a132d30472f3007bf4e85f13 Mon Sep 17 00:00:00 2001 From: alex Date: Mon, 22 Apr 2024 04:46:34 +0300 Subject: [PATCH] Add handleCron 2 --- src/modules/bot/bot.sevice.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/modules/bot/bot.sevice.ts b/src/modules/bot/bot.sevice.ts index b781516..107fcf9 100644 --- a/src/modules/bot/bot.sevice.ts +++ b/src/modules/bot/bot.sevice.ts @@ -1,10 +1,5 @@ import { Update, - Ctx, - Start, - Help, - On, - Hears, InjectBot, } from 'nestjs-telegraf'; import { Context, Telegraf } from 'telegraf'; @@ -33,13 +28,13 @@ export class BotService { return `${year}-${month}-${day}`; } - @Cron('40 * * * * *') + @Cron('10 50 4 * * *') async handleCron() { const reports = []; const settings = await this.semiFinishedSettingsRepository.find(); const dailyReports = await this.semiFinishedDailyRepository.find({ where: { - timeWhenCreated: this.getDateString(new Date('2024-04-22')), + timeWhenCreated: this.getDateString(new Date()), }, });