How can I prevent my Google App Engine cron jobs f

2019-07-20 19:03发布

问题:

I have a google app engine where I have scheduled several cron jobs as database cleanup tasks, but these cron jobs are burning through all my instance hours (front or back), even though the actual processing time of each of these jobs is almost nothing.

Am I doing something wrong? Is there a way I can configure these background tasks to occur without wasting all my instance hours?

回答1:

Take a look at the documentation here: http://code.google.com/appengine/docs/adminconsole/instances.html#Instance_Billing

In general, instance usage is billed on an hourly basis based on the instance's uptime. Billing begins when the instance starts and ends fifteen minutes after the instance shuts down.

Min billable time is basically 15 mins, and you get charged for the full hour. So, when you run a task every 5 minutes and another one every 15 minutes, your instance will never really be not billable, so you are getting billed 24 hours.