开发者

Google App Engine Cron Job

I have created a cron.xml file and a servlet which describes the job.

Now when 开发者_高级运维i compile and login as an admin, local development dashboard doesn't show Cron Jobs link.


Local development server does not have the Cron Jobs link neither does it execute cron jobs. The actual appengine will show cron jobs and will execute them.

You can manually execute cron jobs on local server by visiting their urls. e.g. http://localhost:8888/FindReservedBooksTask.

BTW the cron.xml file should be in the war/WEB-INF directory.


The dev appserver doesn't automatically run your cron jobs. You can use your local desktop's cron or scheduled tasks interface to hit the URLs of your jobs with curl or a similar tool.

Here is the link to the GAE doc on this.

Also, make sure you disable all security constraints for your crons in the web.xml. If you don't have them -- you should restrict cron to admin accounts.


This website walks you through the way to use cron jobs inside of Google App Engine.

Also, The Google App Engine provides a service called the Cron Service that helps us do two fundamental things:

  1. Allows your application to schedule these tasks.
  2. Execute these tasks based on their schedule.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜