The builder for scheduled functions, which are powered by Google Pub/Sub and Cloud Scheduler. Describes the Cloud Scheduler job that is deployed to trigger a scheduled function at the provided frequency. For more information, see [Schedule functions](/docs/functions/schedule-functions).Access via functions.pubsub.schedule().
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-04-24 UTC."],[],[],null,["# pubsub namespace\n\nFunctions\n---------\n\n| Function | Description |\n|---------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------|\n| [schedule(schedule)](./firebase-functions.pubsub.md#pubsubschedule) | Registers a Cloud Function to run at specified times. |\n| [topic(topic)](./firebase-functions.pubsub.md#pubsubtopic) | Registers a Cloud Function triggered when a Google Cloud Pub/Sub message is sent to a specified topic. |\n\nClasses\n-------\n\n| Class | Description |\n|-----------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Message](./firebase-functions.pubsub.message.md#pubsubmessage_class) | Interface representing a Google Cloud Pub/Sub message. |\n| [ScheduleBuilder](./firebase-functions.pubsub.schedulebuilder.md#pubsubschedulebuilder_class) | The builder for scheduled functions, which are powered by Google Pub/Sub and Cloud Scheduler. Describes the Cloud Scheduler job that is deployed to trigger a scheduled function at the provided frequency. For more information, see \\[Schedule functions\\](/docs/functions/schedule-functions).Access via `functions.pubsub.schedule()`. |\n| [TopicBuilder](./firebase-functions.pubsub.topicbuilder.md#pubsubtopicbuilder_class) | The Google Cloud Pub/Sub topic builder.Access via `functions.pubsub.topic()`. |\n\npubsub.schedule()\n-----------------\n\nRegisters a Cloud Function to run at specified times.\n\n**Signature:** \n\n export declare function schedule(schedule: string): ScheduleBuilder;\n\n### Parameters\n\n| Parameter | Type | Description |\n|-----------|--------|----------------------------------------------------|\n| schedule | string | The schedule, in Unix Crontab or AppEngine syntax. |\n\n**Returns:**\n\n[ScheduleBuilder](./firebase-functions.pubsub.schedulebuilder.md#pubsubschedulebuilder_class)\n\nScheduleBuilder interface.\n\npubsub.topic()\n--------------\n\nRegisters a Cloud Function triggered when a Google Cloud Pub/Sub message is sent to a specified topic.\n\n**Signature:** \n\n export declare function topic(topic: string): TopicBuilder;\n\n### Parameters\n\n| Parameter | Type | Description |\n|-----------|--------|------------------------------------------------|\n| topic | string | The Pub/Sub topic to watch for message events. |\n\n**Returns:**\n\n[TopicBuilder](./firebase-functions.pubsub.topicbuilder.md#pubsubtopicbuilder_class)\n\nPub/Sub topic builder interface."]]