toad-scheduler
Version:
In-memory Node.js and browser job scheduler
18 lines (17 loc) • 570 B
TypeScript
export declare enum JobStatus {
RUNNING = "running",
STOPPED = "stopped"
}
export declare abstract class Job {
readonly id: string | undefined;
protected constructor(id?: string);
abstract getStatus(): JobStatus;
abstract start(): void;
abstract stop(): void;
/**
* Applies a scheduler-wide `unref` default to this job. Only takes effect
* when the job was constructed without an explicit `unref` option — a
* per-job setting always wins over the scheduler default.
*/
applyUnrefDefault(unref: boolean): void;
}