@ose4g/cron-manager
Version:
Npm package for ease of working with cron jobs
18 lines (17 loc) • 605 B
TypeScript
import 'reflect-metadata';
export declare const JOB_SYMBOL: unique symbol;
export interface Handler {
handlerTag: string | undefined;
cronExpression: string;
func: string;
constructor: Function;
className: string;
}
/**
*
* Decorator for the cron job method
* @param cronExpression : Expression defining how often the function should run
* @param handlerTag : tag to uniquely identify the handler so the handler can be started or stopped using the tag
* @returns : MethodDecorator
*/
export declare function cronJob(cronExpression: string, handlerTag?: string): MethodDecorator;