From a06da0ceea66aa0532196b56655ee1a613f5f8ac Mon Sep 17 00:00:00 2001 From: Hanriel Date: Thu, 5 Oct 2023 20:35:42 +0500 Subject: [PATCH 1/4] Revert "what" This reverts commit 89f9c8f9661425ce42298f19046b6f9348e727d5. --- src/telegram/telegram.service.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/telegram/telegram.service.ts b/src/telegram/telegram.service.ts index 9fcb357..7e7efa9 100644 --- a/src/telegram/telegram.service.ts +++ b/src/telegram/telegram.service.ts @@ -55,7 +55,11 @@ export class TelegramService { console.log('Taksk Service constructor is started') } - @Cron('0 45 7 * * 1-5') + @Cron('0 45 7 * * 1-5' + //, { + // timeZone: "Asia/Yekaterinburg" + //} + ) handleCron() { this.bot.telegram.sendMessage(process.env.ADMIN_TG_CHATID, 'Утреннее сообщение в 7:45'); } From ac1ee4138a0c99956471a6f6bcfb093355697672 Mon Sep 17 00:00:00 2001 From: Hanriel Date: Thu, 5 Oct 2023 20:36:07 +0500 Subject: [PATCH 2/4] Revert "test" This reverts commit 179864f7e5422aeaa76ea0a8818df017d23400b5. --- src/telegram/telegram.service.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/telegram/telegram.service.ts b/src/telegram/telegram.service.ts index 7e7efa9..7bb7ab6 100644 --- a/src/telegram/telegram.service.ts +++ b/src/telegram/telegram.service.ts @@ -55,11 +55,9 @@ export class TelegramService { console.log('Taksk Service constructor is started') } - @Cron('0 45 7 * * 1-5' - //, { - // timeZone: "Asia/Yekaterinburg" - //} - ) + @Cron('0 45 7 * * 1-5', { + timeZone: "Asia/Yekaterinburg" + }) handleCron() { this.bot.telegram.sendMessage(process.env.ADMIN_TG_CHATID, 'Утреннее сообщение в 7:45'); } From 20c74e75937dafc3d630b714957ca2a65f92bd78 Mon Sep 17 00:00:00 2001 From: Hanriel Date: Thu, 5 Oct 2023 20:36:29 +0500 Subject: [PATCH 3/4] Revert "fix" This reverts commit e880f49280f513630516f89e381846e92c08b455. --- src/telegram/telegram.service.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/telegram/telegram.service.ts b/src/telegram/telegram.service.ts index 7bb7ab6..cb45424 100644 --- a/src/telegram/telegram.service.ts +++ b/src/telegram/telegram.service.ts @@ -62,6 +62,13 @@ export class TelegramService { this.bot.telegram.sendMessage(process.env.ADMIN_TG_CHATID, 'Утреннее сообщение в 7:45'); } + @Cron('0 0 22 * * 1-5', { + timeZone: "Asia/Yekaterinburg" + }) + handleCronEveneeng() { + this.bot.telegram.sendMessage(process.env.ADMIN_TG_CHATID, 'Вечернее сообщение в 22:00'); + } + async getStartMessage(telgramId: number) { let text: string From a5a0c0ba5dd63a50c6eb6c08e76c991083fc9ee4 Mon Sep 17 00:00:00 2001 From: Hanriel Date: Thu, 5 Oct 2023 20:38:37 +0500 Subject: [PATCH 4/4] Revert "fix(#18): Fixing cron timezone" This reverts commit fd77e98ac08c44600998cd76a3cd43926a8f5e95. --- src/telegram/telegram.service.ts | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/telegram/telegram.service.ts b/src/telegram/telegram.service.ts index cb45424..9fcb357 100644 --- a/src/telegram/telegram.service.ts +++ b/src/telegram/telegram.service.ts @@ -55,20 +55,11 @@ export class TelegramService { console.log('Taksk Service constructor is started') } - @Cron('0 45 7 * * 1-5', { - timeZone: "Asia/Yekaterinburg" - }) + @Cron('0 45 7 * * 1-5') handleCron() { this.bot.telegram.sendMessage(process.env.ADMIN_TG_CHATID, 'Утреннее сообщение в 7:45'); } - @Cron('0 0 22 * * 1-5', { - timeZone: "Asia/Yekaterinburg" - }) - handleCronEveneeng() { - this.bot.telegram.sendMessage(process.env.ADMIN_TG_CHATID, 'Вечернее сообщение в 22:00'); - } - async getStartMessage(telgramId: number) { let text: string