Question

I've scheduled daily job to be informed about daily quota replenishment, which happens at midnight Pacific time. Looks like it is equal to UTC-7 (or GMT-7). My local time is GMT+4. When checking the log (GMT+4 is chosen there), I see that my job runs at midnight:

2014-04-22 04:00:00.278 /admin/resetquota 200 121ms 0kb AppEngine-Google; (+http://code.google.com/appengine) module=default version=1

But when now I check Quota Details page of GAE console (local time is 5:26pm), it says that quotas will be reset in next 18 hours, i.e. at 11am local time.

Does it mean that cron tasks use UTC time, when quota replenishment happens at UTC-7? Looks like cron.yaml allows to define timezone. How can I indicate the UTC-7 here? Is it US/Pacific?

Was it helpful?

Solution

Yes cron tasks use UTC time by default, but you can specify a timezone and US/Pacific is valid:

- description: daily task
  url: /cron/daily
  schedule: every day 00:00
  timezone: US/Pacific

If you try and use a timezone that is not recognised, when you update_cron an error is thrown:

Error parsing yaml file:
Unable to assign value 'US/does-not-exist' to attribute 'timezone':
timezone 'US/does-not-exist' is unknown
  in "./cron.yaml", line 13, column 13
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top