@mann-conomy/job-scheduler
Version:
A simple background job scheduler for the Mann-Conomy project.
16 lines (15 loc) • 513 B
TypeScript
import type { CronJob } from "cron";
import type { DateTime } from "luxon";
export type ScheduledJob = CronJob<() => void, () => void>;
export type JobResolver<T> = () => T | Promise<T>;
export type JobExpression = string | Date | DateTime;
export interface JobOptions {
context: () => void;
name: string | null;
start: boolean | null;
timeZone: string | null;
threshold: number | null;
runOnInit: boolean | null;
unrefTimeout: boolean | null;
waitForCompletion: boolean | null;
}