开发者

Cron job for /_ah/xmpp/message/chat/

开发者 https://www.devze.com 2023-02-09 17:34 出处:网络
I\'m trying to create a jabber bot which has to perform an a开发者_开发问答ction every 5 minutes.

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:

  1. Take a look at Logs in application control panel
  2. Ensure, that war.xml has correct description of your servlet
  3. Test your service by opening URL of your application with browser or CURL - either on test server, or on GAE infrastructure.
0

精彩评论

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

关注公众号