@juzi/wechaty-puppet-whatsapp
Version:
Wechaty Puppet for WhatsApp
19 lines • 818 B
TypeScript
import { Job, JobCallback, RecurrenceRule, RecurrenceSpecDateRange, RecurrenceSpecObjLit } from 'node-schedule';
type ScheduleRule = RecurrenceRule | RecurrenceSpecDateRange | RecurrenceSpecObjLit | Date | string | number;
export default class ScheduleManager {
private static _instance?;
private jobPool;
private constructor();
static get Instance(): ScheduleManager;
/**
* Create a schedule job.
*
* @param rule scheduling info, ref: https://github.com/node-schedule/node-schedule#cron-style-scheduling
* @param callback callback to be executed on each invocation
*/
addScheduledTask(rule: ScheduleRule, callback: JobCallback): Job;
removeScheduledTask(job: Job): boolean;
clearAllTasks(): void;
}
export {};
//# sourceMappingURL=schedule-manager.d.ts.map