What happens when cron jobs fail depends on the type of failure. Errors occurring within the module pointed to by the cron job will propagate to the cron job. If the module referred to by the URL of the cron job is unavailable or otherwise unresponsive, I believe a 5xx HTTP response is returned.
Regarding your questions of Datastore records processed during a cron job, this is not connected to cron jobs but rather the module processing those tasks, the speed/size of Datastore retrievals, the concurrency of requests being made, etc. If the cron jobs are outlasting the 10-minute limitation described in the 'Scheduled Tasks <https://cloud.google.com/appengine/features/#cron>' article, you may want to study the performance of the module being used to find some possible optimizations. To help with this analysis, you may want to consider using Cloud Trace <https://cloud.google.com/trace/>. Though in Beta, it can reveal great detail on where your bottleneck can be found. For instance, bulk operations <https://cloud.google.com/datastore/docs/concepts/entities#Datastore_Batch_operations> may be used to consolidate Datastore operations to reduce retrieve more records per request. If this is already being used, you could consider using memcache <https://cloud.google.com/appengine/articles/best-practices-for-app-engine-memcache> instead to contain this data temporarily until sent to Cloud Monitoring. The linked Best Practices <https://cloud.google.com/appengine/articles/best-practices-for-app-engine-memcache> article can be very helpful in this case showing how to handle checks, sets and batch operations. Otherwise, you may consider configuring the cron job module to scale with more instances or more powerful tiers. An introduction to scaling for App Engine can be found with the article 'How Apps Scale <https://cloud.google.com/appengine/docs/python/scaling>'. Hope this helps. On Tuesday, January 12, 2016 at 11:52:26 PM UTC-5, Nikita Sahasrabuddhe wrote: > > Hi, > > I have written a code to write data to custom metrics cloud monitoring - > google app engine. > > For that i am storing the data for some amount of time say: 15min into > datastore and then a cron job runs and gets the data from there and plots the > data on the cloud monitoring dashboard. > > Now my problem is : while fetching huge data to plot from the datastore the > cron job may timeout. Also i wanted to know what happens when cron job fails > ? Also Can it fail if the number of records is high ? if it can, what > alternates could we do. Safely how many records cron could process in 10 min > timeout duration. > > Please let me know if any other info is needed. > > Thanks! > > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/7b05e239-eb1f-4328-b726-a523d80cfe34%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
