1 | initial version |
To specify a particular time zone in a Scheduled Cloud Function, you can use the timeZone
parameter when configuring the schedule. This parameter accepts a string value that represents the time zone in the format of Area/Location
such as "America/New_York" or "Asia/Tokyo".
For example, to schedule a function to run every day at 9:00 AM EST, you can set the timeZone
parameter to "America/New_York" as follows:
exports.scheduledFunction = functions.pubsub.schedule('every day 09:00').timeZone('America/New_York').onRun((context) => {
console.log('This will be run every day at 9:00 AM EST!');
});