mirror of
https://github.com/LightZirconite/Microsoft-Rewards-Bot.git
synced 2026-01-10 09:16:16 +00:00
feat: add automatic task scheduling configuration for Windows and Linux
This commit is contained in:
@@ -19,6 +19,7 @@ import { QueryDiversityEngine } from './util/QueryDiversityEngine'
|
||||
import JobState from './util/JobState'
|
||||
import { StartupValidator } from './util/StartupValidator'
|
||||
import { MobileRetryTracker } from './util/MobileRetryTracker'
|
||||
import { SchedulerManager } from './util/SchedulerManager'
|
||||
|
||||
import { Login } from './functions/Login'
|
||||
import { Workers } from './functions/Workers'
|
||||
@@ -128,6 +129,12 @@ export class MicrosoftRewardsBot {
|
||||
if (this.config.jobState?.enabled !== false) {
|
||||
this.accountJobState = new JobState(this.config)
|
||||
}
|
||||
|
||||
// Setup automatic scheduler if enabled
|
||||
if (this.config.scheduling?.enabled) {
|
||||
const scheduler = new SchedulerManager(this.config)
|
||||
await scheduler.setup()
|
||||
}
|
||||
}
|
||||
|
||||
private shouldSkipAccount(email: string, dayKey: string): boolean {
|
||||
|
||||
Reference in New Issue
Block a user