Skip to content

Commit

Permalink
Add handleCron 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandros12345 committed Apr 22, 2024
1 parent d1e64f9 commit 34b27d5
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/modules/bot/bot.sevice.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import {
Update,
Ctx,
Start,
Help,
On,
Hears,
InjectBot,
} from 'nestjs-telegraf';
import { Context, Telegraf } from 'telegraf';
Expand Down Expand Up @@ -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()),
},
});

Expand Down

0 comments on commit 34b27d5

Please sign in to comment.