Cron job for /_ah/xmpp/message/chat/
I'm trying to create a jabber bot which has to perform an a开发者_开发问答ction every 5 minutes.
So he has a doGet method, and there is a cron.xml which triggers a servlet at the path <url>/_ah/xmpp/message/chat/</url>
But in my Web Admin Panel I see that cron task never succeeds.
/_ah/xmpp/message/chat/ every 5 minutes (UTC)
Pinging 2011/02/11 04:21:40 on time Failed
So is it restriced by GAE, and /_ah/xmpp/message/chat/ cannot be triggered by Cron? Or am I doing something wrong?
/_ah/xmpp/message/chat/
is the URL that receives messages, so pinging this URL in a cron job would simulate receiving an XMPP message, and may be disabled for this use case as a result.
If you want to send an XMPP message every 5 minutes, you can do that in a regular handler that calls xmppService.sendMessage()
.
If you want to simulate receiving an XMPP message every 5 minutes, you can handle message reception in a regular handler and have your real XMPP handler call that handler when a message is received.
It's hard to say something without any details.
I'd recommend to:
- Take a look at Logs in application control panel
- Ensure, that war.xml has correct description of your servlet
- Test your service by opening URL of your application with browser or CURL - either on test server, or on GAE infrastructure.
精彩评论