Back to Pocketbase

Function cronAdd

static/jsvm/functions/cronAdd.html

latest768 B
Original Source

Function cronAdd

  • cronAdd(jobId, cronExpr, handler): void

CronAdd registers a new cron job.

If a cron job with the specified name already exist, it will be replaced with the new one.

Example:

// prints "Hello world!" on every 30 minutescronAdd("hello", "*/30 * * * *", () => { console.log("Hello world!")})Copy

Note that this method is available only in pb_hooks context.

Parameters

jobId: string
cronExpr: string
handler: (() => void)
- 
  - (): void
  - 

Returns void

Returns void

Settings

Member Visibility

  • Inherited

Theme

OSLightDark

Generated using TypeDoc