scheduler namespace

Functions

Function Description
onSchedule(schedule, handler) Handler for scheduled functions. Triggered whenever the associated scheduler job sends a http request.
onSchedule(options, handler) Handler for scheduled functions. Triggered whenever the associated scheduler job sends a http request.

Interfaces

Interface Description
ScheduledEvent Interface representing a ScheduleEvent that is passed to the function handler.
ScheduleFunction The Cloud Function type for Schedule triggers.
ScheduleOptions Options that can be set on a Schedule trigger.

scheduler.onSchedule()

Handler for scheduled functions. Triggered whenever the associated scheduler job sends a http request.

Signature:

export declare function onSchedule(schedule: string, handler: (event: ScheduledEvent) => void | Promise<void>): ScheduleFunction;

Parameters

Parameter Type Description
schedule string The schedule, in Unix Crontab or AppEngine syntax.
handler (event: ScheduledEvent) => void | Promise<void> A function to execute when triggered.

Returns:

ScheduleFunction

A function that you can export and deploy.

scheduler.onSchedule()

Handler for scheduled functions. Triggered whenever the associated scheduler job sends a http request.

Signature:

export declare function onSchedule(options: ScheduleOptions, handler: (event: ScheduledEvent) => void | Promise<void>): ScheduleFunction;

Parameters

Parameter Type Description
options ScheduleOptions Options to set on scheduled functions.
handler (event: ScheduledEvent) => void | Promise<void> A function to execute when triggered.

Returns:

ScheduleFunction

A function that you can export and deploy.