开发者

Cron not running

My cron has stopped running. If I enter the url manually it works. But the cron page in dashboard says "Hasn't been run". I tried changing frequency, timezone but to no avail.

My cron.yaml looks:

cr开发者_运维百科on:

- description: clear data
  url: /data
  schedule: every 1 minutes

Does any one has any idea on why its not running ? Please help.


I had the same problem. In my case the error was that I didn't return HTTP 200 in the cron handler.

Edit: It also didn't work (with symptoms as described in the OP) when I just scheduled it as "every 24 hours". When I changed it to "daily 10.00" it worked.


I had the same problem. Using:

schedule: every 1 mins

works. Apparently, "mins" works. I was not able to make it work with "minutes".


I'm not sure if this matters, but you could try schedule: every 1 minute


Have you set OK http response to the end of your servlet ? Like that :

//Set Http Response To 200
res.setStatus(HttpServletResponse.SC_OK);
//Set ContentType
res.setContentType("text/plain");


I couldn't get it to work. Tried mins and minutes. Yes, the job returns a 200, but its not even getting called in the first place. A search of the logs reveals zero invocations.

My app was in node, I ended up using setInterval to work around it.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜