Hi Martin,
On Thu, Nov 10, 2011 at 12:53 PM, Martin Evans <website(a)studenthubs.org> 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
But I know the
scheduler can behave differently so I'm happy to investigate it.
The script reads and parses RSS XML from an external site, and creates or
updates contents of pages and objects as necessary. I'm not keen to post
the whole source code on here but if someone has some experience that could
help, I can email it directly.
Martin
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users