0

The doc says that HTTP requests initiated by cron job can run for 10 minutes (believe, this is about urlfetch).

My cron job does another time consuming task - e-mails sending (thru google.appengine.api.mail). Do I also have 10 minutes for this activity (before I'll get DeadlineExceededError)? Or, should I use task queue to send each message in the separate task?

LA_
  • 19,823
  • 58
  • 172
  • 308
  • 1
    You should invoke a task for any long running requests, then they can be retried automatically if there is an error by the task queue or you can easily split the process up into chunks and chain tasks, or run tasks in parallel. – Tim Hoffman May 26 '14 at 09:39

2 Answers2

2

There is no limit on cron jobs/tasks running on Backend instances. You can configure these instances using Modules, and then target your cron job to hit one of these instances.

It may still be a good idea to queue each message as a separate task.

Andrei Volgin
  • 40,755
  • 6
  • 49
  • 58
  • Thanks, Andrei. Based on your answer on another my question, I know about Modules :). But my question is about main instance. Does cron job have 10 minutes limit there? – LA_ May 26 '14 at 10:36
  • There are two types of instances: F and B. All requests to F instances have a 10 minute time limit. – Andrei Volgin May 26 '14 at 10:46
0

yeah it is possible to make a time limit for corn job. I also doing same job for my **project shopliame.

**new CronJob(
"*/20 * * * * *",
function () {
  console.log("This is a batch job started at " + new Date());
},
null,
true,
""

);**

and here is your answer