cronTrigger jsdocs
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@trigger.dev/sdk": patch
|
||||
---
|
||||
|
||||
cronTrigger jsdocs
|
||||
@@ -24,6 +24,7 @@ export const CronOptionsSchema = z.object({
|
||||
cron: z.string(),
|
||||
});
|
||||
|
||||
/** The options for a `cronTrigger()` */
|
||||
export type CronOptions = z.infer<typeof CronOptionsSchema>;
|
||||
|
||||
export const CronMetadataSchema = z.object({
|
||||
|
||||
@@ -122,6 +122,9 @@ export class CronTrigger implements Trigger<ScheduledEventSpecification> {
|
||||
}
|
||||
}
|
||||
|
||||
/** `cronTrigger()` is set as a [Job's trigger](https://trigger.dev/docs/sdk/job) to trigger a Job on a recurring schedule using a CRON expression.
|
||||
* @param options An object containing options about the CRON schedule.
|
||||
*/
|
||||
export function cronTrigger(options: CronOptions) {
|
||||
return new CronTrigger(options);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user