Schedule your work with Google Scheduler
Scheduling a job comes to start at the Particular time of days plays a major role in any software. In this Blog Post lets understand how to do it in Google Cloud
Scheduling has bedrock for any software system; that includes sending an email for this newsletter to reconcile payments in the Global bank. Google Scheduler is an offering from Google to do it much more manageable.
Let’s take a use case of a Health Check for Google or Amazon.
To start, let’s understand the interface of the Google Scheduler. You need to have a Google cloud account which will be your Gmail account in most cases, and Gcloud offers $300 for developers.
You can reach the google Scheduler using the following URL.
It contains the list of the all the jobs running, and we will be interested in creating a Job, so let us click that Create Job button, which will open the following UI
Most of the fields are self-explanatory, and CRON specification exceptional in this, and you can understand it using.
In the following case, I plan to run the scheduler every 5 mins. Let’s click on continue to configure the Endpoint to do the health check.
In our case, it will be an HTTP Trigger where you can configure the URL with an HTTP Method to call.
Click on Continue to do optional settings, including retry and other resiliency options, and in our case, let us leave it default.
Click on create to start the job. This job runs every 5 mins and verifies if the Google is up or down.
HTTP trigger uses the HTTP status code to determine if the service is up or down. So 200 codes are considered a success, and 400/500 status codes are failures.