From the course: Google Cloud Platform (GCP) Essential Training for Developers

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Deploying daily subscriber emails

Deploying daily subscriber emails - Google Cloud Tutorial

From the course: Google Cloud Platform (GCP) Essential Training for Developers

Start my 1-month free trial

Deploying daily subscriber emails

- [Instructor] All right. Now we're going to use Google Cloud Scheduler to trigger a task that sends email to our users every day. In line 94 we have a generic morning email tasks endpoint which we want to trigger every 8:00 AM on the user's time. The challenge is that the users are in different time zones. To solve this we plan to trigger this every hour and then filter the users according to who should get the 8:00 AM email at that time based on their time zone. So line 96 only retrieves the user emails that are 8:00 AM at their time zone and then creates a tasks to send them emails on line 99 onwards. So what's left to do is to simply trigger this end point every hour on every day, and that's what we're going to use Cloud Scheduler for. Let's open the Cloud Scheduler page in Google Cloud Console and Create a new job. Let's give it a name, "Send daily emails." Let's give it a description. (mouse clicking) For the…

Contents