@mastra/core
Version:
24 lines • 1.07 kB
TypeScript
import { Scheduler } from '../../workflows/scheduler/scheduler.js';
import type { SchedulerConfig } from '../../workflows/scheduler/types.js';
import { MastraWorker } from '../worker.js';
import type { WorkerDeps } from '../worker.js';
/**
* Drives cron-based workflow and agent schedules. On each tick it polls
* storage for due schedules, computes next fire times, and publishes fire
* events. Does not consume events — only produces them.
*
* This is the **single** scheduler code path. `Mastra.startWorkers()` adds it
* when scheduling work exists or the scheduler is explicitly enabled.
*/
export declare class SchedulerWorker extends MastraWorker {
#private;
readonly name = "scheduler";
constructor(config?: SchedulerConfig);
init(deps: WorkerDeps): Promise<void>;
start(): Promise<void>;
stop(): Promise<void>;
get isRunning(): boolean;
/** Expose the underlying scheduler for direct API access (e.g., schedule management). */
get scheduler(): Scheduler | undefined;
}
//# sourceMappingURL=scheduler-worker.d.ts.map