I need to run a task every hour on the hour (00:00, 01:00, 02:00, ..., 23:00) every day of the week, but can't seem to find an example in App Engine's docs of how to do this.
There is an example of running at ask every hour, but this doesn't fit because the "start" of that hour depends on when you deploy the application. That is, if I deploy at 4:37 PM, the cron scripts will get executed at 5:37, 6:37, ... instead of 5:00, 6:00, ...
So far the only way that looks like it would work is to have 24 different cron entries, one for the specific hour of each day set to run each day at that specific time.
Does anyone know of anything that would let me use a schedule like "every hour at :00" or even "every day 00:00, 01:00, ... 23:00"?
You could do this, and give up the exactly on the hour, but it will be close...
(Example came from a app I was debuging)
cron:
- description: Description of what you want done...
url: /script/path/goes/here
schedule: every 60 minutes synchronized
timezone: America/New_York
Below is a screenshot of the logs, the app gets no traffic right now, 99% of those entries are all the cron entry.
--- edit ---
Just re-read the docs as well and maybe this might be better,
schedule: every 60 minutes from 00:00 to 23:59
Unfortunately, the cron syntax doesn't let you specify the time for intervals less than a day. What you can do, however, is use the Task Queue for this. Either:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With