Hello Pravanjan, There are two issues here:
1. Regarding the "it just run after 6 minutes" issue, the cron timer is not exact. If you declare a cron timer of "every 5 minutes" the cron scheduler will do its best to respect that; however sometimes it slips a little late. Sometimes the same thing happens with the Task Queue service. How are you computing the 6 second timer, via logs or via printing out timestamps from your app? Sometimes there are other delays at play, such as a cold start. 2. The HardDeadlineExceededError is not cron's fault; your application's request handler ran over the limit of 10 minutes and was forcibly shut down by AppEngine. Something in your processBatch function is taking too long to return. ----------------- -Vinny P Technology & Media Advisor Chicago, IL My Go side project: http://invalidmail.com/ On Monday, June 10, 2013 11:01:23 AM UTC-5, Pravanjan Niranjan wrote: > > Hi , > I am running a cron to send the batch email message to my customer . and > my cron file looks like this . > <?xml version="1.0" encoding="UTF-8"?> > > <cronentries> > <cron> > <target>2</target> > <description>validate batch message schedular</description> > <url>/api/CronBatchMessageController/processBatch.req</url> > <schedule>every 5 minutes from 00:00 to 23:59</schedule> > </cron> > </cronentries> > > By following the corn configuration it has to run every 5 min starting > with 00:00 and then 00:05 but some time it just run > after 6 minutes. not sure why this is happing . > > and the biggest problem i faced here it that cron url is getting time out > saying HardDeallineExceded erro. > > > code for running cron url: > > @Controller > @RequestMapping("/CronBatchMessageController") > public class CronBatchMessageController { > CronBatchMessageHelper cronHelper = new CronBatchMessageHelper(); > FormateRecurrenceCondition formateRecurrence = > newFormateRecurrenceCondition(); > private static Logger logger = Logger.getLogger(CronBatchMessageHelper. > class.getPackage().getName()); > > > @RequestMapping("/processBatch") > public void processBatch(HttpServletRequest request ,HttpServletResponse > response){ > ArrayList batchMessageList = new ArrayList(); > ModelAndView model = new ModelAndView(); > try{ > batchMessageList = cronHelper.getAllScheduleBatch(request,response); > cronHelper.findSchedularfallInCurrentTimeInterval(batchMessageList); > response.setContentType("text/plain"); > response.getWriter().write("success"); > } > catch(Exception e){ > StringWriter sw = new StringWriter(); > PrintWriter pw = new PrintWriter(sw); > e.printStackTrace(pw); > logger.info(sw.toString()); > > > } > > > Please find the attached screenshots for more detail. > > > > > > } > > -- 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 http://groups.google.com/group/google-appengine?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
