scheduler namespace
Stay organized with collections
Save and categorize content based on your preferences.
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.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-04-18 UTC.
[null,null,["Last updated 2023-04-18 UTC."],[],[],null,["# scheduler namespace\n\nFunctions\n---------\n\n| Function | Description |\n|----------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------|\n| [onSchedule(schedule, handler)](./firebase-functions.scheduler.md#scheduleronschedule) | Handler for scheduled functions. Triggered whenever the associated scheduler job sends a http request. |\n| [onSchedule(options, handler)](./firebase-functions.scheduler.md#scheduleronschedule) | Handler for scheduled functions. Triggered whenever the associated scheduler job sends a http request. |\n\nInterfaces\n----------\n\n| Interface | Description |\n|------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [ScheduledEvent](./firebase-functions.scheduler.scheduledevent.md#schedulerscheduledevent_interface) | Interface representing a ScheduleEvent that is passed to the function handler. |\n| [ScheduleFunction](./firebase-functions.scheduler.schedulefunction.md#schedulerschedulefunction_interface) | The Cloud Function type for Schedule triggers. |\n| [ScheduleOptions](./firebase-functions.scheduler.scheduleoptions.md#schedulerscheduleoptions_interface) | Options that can be set on a Schedule trigger. |\n\nscheduler.onSchedule()\n----------------------\n\nHandler for scheduled functions. Triggered whenever the associated scheduler job sends a http request.\n\n**Signature:** \n\n export declare function onSchedule(schedule: string, handler: (event: ScheduledEvent) =\u003e void | Promise\u003cvoid\u003e): ScheduleFunction;\n\n### Parameters\n\n| Parameter | Type | Description |\n|-----------|-------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------|\n| schedule | string | The schedule, in Unix Crontab or AppEngine syntax. |\n| handler | (event: [ScheduledEvent](./firebase-functions.scheduler.scheduledevent.md#schedulerscheduledevent_interface)) =\\\u003e void \\| Promise\\\u003cvoid\\\u003e | A function to execute when triggered. |\n\n**Returns:**\n\n[ScheduleFunction](./firebase-functions.scheduler.schedulefunction.md#schedulerschedulefunction_interface)\n\nA function that you can export and deploy.\n\nscheduler.onSchedule()\n----------------------\n\nHandler for scheduled functions. Triggered whenever the associated scheduler job sends a http request.\n\n**Signature:** \n\n export declare function onSchedule(options: ScheduleOptions, handler: (event: ScheduledEvent) =\u003e void | Promise\u003cvoid\u003e): ScheduleFunction;\n\n### Parameters\n\n| Parameter | Type | Description |\n|-----------|-------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------|\n| options | [ScheduleOptions](./firebase-functions.scheduler.scheduleoptions.md#schedulerscheduleoptions_interface) | Options to set on scheduled functions. |\n| handler | (event: [ScheduledEvent](./firebase-functions.scheduler.scheduledevent.md#schedulerscheduledevent_interface)) =\\\u003e void \\| Promise\\\u003cvoid\\\u003e | A function to execute when triggered. |\n\n**Returns:**\n\n[ScheduleFunction](./firebase-functions.scheduler.schedulefunction.md#schedulerschedulefunction_interface)\n\nA function that you can export and deploy."]]