Reputation: 11
I have created a job in Cloud scheduler like below:
Name : Start_BOT1
Frequency : 0 */15 * * * (Asia/Calcutta)
Target : A topic in Pub/Sub
As per the Frequency the job has to start every 15 mins once. But the job is not working as expected. It runs only when we click on "Run NOW" button. Can someone help explain how the scheduler works in GCP and how the timezones works here.
Upvotes: 1
Views: 3109
Reputation: 1221
Here you can find detailed information on Configuring Cron Job Schedules with the unix-cron format.
The 1st asterisk represents the minute
The 2th asterisk represents the hour
The 3th asterisk represents the day of month
The 4th asterisk represents the month
The 5th asterisk represents the day of the week
For step values, you correctly used the slash, executing every N steps.
For your case - running the job every 15 minutes, the configuration would be: “*/15 * * * *”
You can select the time zone for evaluating the schedules either by using the dropdown on the GCP Console Create a job screen or the gcloud --time-zone flag when you create the job. The default time-zone is Etc/UTC.
Upvotes: 3