import type { BaseAdapter, SchedulePayload } from '../adapters/BaseAdapter/BaseAdapter.js'; import type { BasicLogger, Job, QueueNames, ScheduleJobOptions } from '../types.js'; interface SchedulerConfig { adapter: TAdapter; logger?: BasicLogger; } export declare class Scheduler { adapter: TAdapter; logger: NonNullable['logger']>; constructor({ adapter, logger }: SchedulerConfig); computeRunAt({ wait, waitUntil }: { wait: number; waitUntil: Date | null; }): Date; buildPayload>({ job, args, options, }: { job: TJob; args: Parameters | never[]; options?: ScheduleJobOptions; }): SchedulePayload; schedule>({ job, args, options, }: { job: TJob; args: Parameters | never[]; options?: ScheduleJobOptions; }): Promise; /** * Cancel a scheduled job so that it will not be run (if it's still queued) * or not be retried (if it's currently running). Requires an adapter that * implements the optional `cancel()` method, like the `PrismaAdapter`. * * Returns whatever the adapter's `cancel()` returns (for the * `PrismaAdapter` that's `true` if a job was cancelled and `false` if no * cancellable job with the given id was found) */ cancel(jobId: string | number): Promise; } export {}; //# sourceMappingURL=Scheduler.d.ts.map