2

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?

BrianE
  • 23
  • 3
  • How frequently are they running? How little time is “almost nothing?” – BRPocock Dec 29 '11 at 16:42
  • Also - how many instance hours is "all my instance hours"? – Peter Recore Dec 29 '11 at 17:06
  • I have 2 jobs - 1 scheduled for every 5 minutes, one for every 15 minutes. Neither of these are doing a lot of work - in fact I'm running with empty databases right now just as a test. Running both of these on the frontend will cost me about 24 of my 28 instance hours each day. Is this normal? – BrianE Dec 29 '11 at 19:40

1 Answers1

5

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.

Sologoub
  • 5,312
  • 6
  • 37
  • 65
  • Thanks - didn't see that before. Not the answer I want though :) – BrianE Dec 31 '11 at 02:28
  • No worries! Yeah, GAE has many out of the box features, but everything comes at a price :) – Sologoub Dec 31 '11 at 02:47
  • 3
    @BrianE, why is this so bad? You still aren't paying anything, and if your cron jobs aren't doing much, the same instances that are servicing the cron jobs should be able to serve a bunch of "regular" page views. – Peter Recore Jan 03 '12 at 17:00