简体   繁体   English

谷歌应用程序引擎cron.xml不起作用

[英]google app engine cron.xml doesn't work

The cron.xml of GAE doesn't pick up the servlet specified in <cron> under <cronentries> . GAE的cron.xml没有获取<cronentries><cronentries> <cron>指定的servlet。 Also the cron configuration link is missing in the admin console. 管理控制台中也缺少cron配置链接。 If anyone faced the same issue please let me know the solution. 如果有人遇到同样的问题,请告诉我解决方案。 Btw. 顺便说一句。 I am using GAE 1.4.3 with Eclipse plugin. 我正在使用带有Eclipse插件的GAE 1.4.3。

cron.xml:

  <?xml version="1.0" encoding="UTF-8"?>
  <cronentries>
  <cron>
  <url>/schedulerServlet</url>
  <description>triggered every 2 minutes</description>
  <schedule>every 2 minutes</schedule>
  </cron>
  </cronentries>

servlet code:

  public class SchedulerServlet extends HttpServlet {
     // doGet method definition{
        // things to do 
     }
  }

Are you testing this on the local development environment? 您是否在本地开发环境中进行测试? If so, I am afraid to tell you that it is not supported on local development server. 如果是这样,我恐怕会告诉您本地开发服务器不支持它。

Once you upload your code to GAE, you will see that it works like a charm. 将代码上传到GAE后,您会发现它就像魅力一样。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM