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.
The App Engine Cron Service allows you to configure regularly scheduled tasks that operate at defined times or regular intervals. These tasks are commonly known as cron jobs.
0 * * * * -this means the cron will run always when the minutes are 0 (so hourly) 0 1 * * * - this means the cron will run always at 1 o'clock. * 1 * * * - this means the cron will run each minute when the hour is 1. So 1:00 , 1:01 , ... 1:59 .
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With