[xwiki-users] Scheduler jobs not completing
Hi Martin,
On Thu, Nov 10, 2011 at 12:53 PM, Martin Evans <[email protected]> wrote:
On 11/08/2011 04:03 PM, Martin Evans wrote:
I have a job scheduled to run once an hour. It logs its progress and I can see that it's not completing the task. The weird thing is it gets a different amount through each time. And if I paste the groovy code
into a
normal page and view it, it executes the whole script no problems.
Any ideas anyone?
It should not stop for external reasons, the only thing that could stop it is an exception triggered while running the code, like a NullPointerException when reading some data. Can you give more details, what exactly does the code try to do? -- Sergiu Dumitriu http://purl.org/net/sergiu/
Ok so is there any way to see what exceptions are raised?
I don't think it is that, because when I run it in a page it works fine.
This is not a good indicator because the servlet context (when you run your script in a wiki page) is very different than the "daemon" context (when your script is triggered by a scheduler). In the later you don't have the (servlet) request and response objects and thus you don't have a current document.
Hope this helps, Marius
Thanks but in that case how can I debug the daemon script? It doesn't do what it is meant to do, and that's all I know. What's stranger is that it sometimes gets further through the scrip than other times. Martin
participants (1)
-
Martin Evans