File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change 1- import { Config } from '@app/constants ' ;
1+ import { CronTab } from '@app/decorators ' ;
22import { Injectable } from '@nestjs/common' ;
3- import { Cron } from '@nestjs/schedule' ;
43import { LegendTasksService } from '../../legends/services/legend-tasks.service' ;
54import { ClanGamesTasksService } from './clan-games-tasks.service' ;
65
@@ -11,17 +10,15 @@ export class AutoTasksService {
1110 private clanGamesTasksService : ClanGamesTasksService ,
1211 ) { }
1312
14- @Cron ( '59 4 * * *' , {
15- timeZone : 'Etc/UTC' ,
16- disabled : ! Config . CRON_ENABLED ,
13+ @CronTab ( '59 4 * * *' , {
14+ monitor : 'legend-ranking-snapshot' ,
1715 } )
1816 runLegendTasks ( ) {
1917 return this . legendTasksService . takeSnapshot ( ) ;
2018 }
2119
22- @Cron ( '0 5 22 * *' , {
23- timeZone : 'Etc/UTC' ,
24- disabled : ! Config . CRON_ENABLED ,
20+ @CronTab ( '0 5 22 * *' , {
21+ monitor : 'clan-games-log-cleanup' ,
2522 } )
2623 runClanGamesTask ( ) {
2724 return this . clanGamesTasksService . runClanGamesTask ( ) ;
You can’t perform that action at this time.
0 commit comments