diff --git a/storage/framework/core/types/src/cron-jobs.ts b/storage/framework/core/types/src/cron-jobs.ts index 7330b4b54..7a4f08d75 100644 --- a/storage/framework/core/types/src/cron-jobs.ts +++ b/storage/framework/core/types/src/cron-jobs.ts @@ -26,6 +26,8 @@ export enum Every { Year = '0 0 1 1 *', } +export type JobHandler = (data?: any) => Promise | any + /** * Represents different backoff strategies for job retries */ @@ -81,7 +83,7 @@ export interface JobOptions { /** * Job handler function or identifier string */ - handle?: string | Function + handle?: string | JobHandler /** * Action identifier */