I don't know much about the scheduler but I know that your script should be inclosed in {{groovy}} and {{/groovy}} macro tags, it should be saved in syntax 2.0, The user who saves the script must have programming rights for it to execute and eventLog.save() may not work if the scheduler doesn't have edit right on the eventLog page. Try eventLog.saveWithProgrammingRights() to override that possible problem. Caleb James DeLisle Rieken, Joshua wrote:
-----Original Message----- From: users-bounces@xwiki.org [mailto:users-bounces@xwiki.org] On Behalf Of Thomas Mortagne Sent: Wednesday, February 24, 2010 2:24 PM To: XWiki Users Subject: Re: [xwiki-users] Scheduler not executing job correctly (or at all)
Hi,
I think when you create a job it's not enabled by default. You have to "schedule" on http://host/xwiki/bin/view/Scheduler/ UI.
I scheduled it, but it didn't run. I also tried triggering it manually, but that didn't work either.
-Joshua
On Wed, Feb 24, 2010 at 20:44, Rieken, Joshua <Joshua_Rieken@reyrey.com> wrote:
Hello,
I'm attempting to run the following Groovy script with the Scheduler app: def eventLog = xwiki.getDocument("CodeTest.TestEventLog") eventLog.setContent(eventLog.getContent() + "This is a test.") eventLog.save()
However, this does nothing. I have scheduled the job (which is supposed to run every 5 minutes) and triggered it manually, but it still doesn't do anything. I also tried surrounding the code with {{groovy}}{{/groovy}}.
My cron expression is the following: 0 0/5 * * * ?
Running on XWiki Enterprise 2.1.1.
Thanks in advance.
-Joshua
_______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
-- Thomas Mortagne _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users