Skip to content

Commit

Permalink
🕑 Add cron
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashu11-A committed May 25, 2024
1 parent db5a64a commit a0396fd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/src/controller/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,12 @@ export class Auth {
console.log('❌ Bot desabilitado!')
}

if (Auth.bot === undefined) this.startCron()

Auth.bot = data
}

async startCron (): Promise<void> {
startCron (): void {
const job = new CronJob('* * * * *', () => this.validator())
job.start()
}
Expand Down

0 comments on commit a0396fd

Please sign in to comment.