I have created a cron.xml
file and a servlet which describes the job.
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:
- Allows your application to schedule these tasks.
- Execute these tasks based on their schedule.
精彩评论