Re: [xwiki-users] Using Scheduler issues (groovy questions)

2010-10-25 Thread Jean-Vincent Drean
Hi, have you tried something like xwiki.getDocument('Space.YourScript').getRenderedContent() ? JV. On Sat, Oct 23, 2010 at 11:26 PM, Eugen Colesnicov wrote: > > Hi colleagues! > > I need some help for the Scheduler. > I already have some not small script in a velocity. This script select some >

Re: [xwiki-users] Using Scheduler issues (groovy questions)

2010-10-24 Thread Eugen Colesnicov
Paul Libbrecht wrote: > > what I was telling is that you should be able to get its execution from > groovy with > new URL("http://server/xwiki/bin/iview/MyScheduler/Velo";).getContent() > > and, if you needed secure access for that execution you could request > new > URL("http://admin:p...@

Re: [xwiki-users] Using Scheduler issues (groovy questions)

2010-10-24 Thread Paul Libbrecht
Eugen, you said you have a velocity page, say accessible at http://server/xwiki/bin/iview/MyScheduler/Velo what I was telling is that you should be able to get its execution from groovy with new URL("http://server/xwiki/bin/iview/MyScheduler/Velo";).getContent() and, if you needed secure ac

Re: [xwiki-users] Using Scheduler issues (groovy questions)

2010-10-24 Thread Paul Libbrecht
On 24 oct. 2010, at 16:29, [Ricardo Rodriguez] eBioTIC. wrote: >> or call http://user:passw...@host:port/xwiki/bin/view/Space/Name >> >> paul >> _ > > It doesn't work for me here. Please, any particular requirement/setting > on the server side? I don't think so. But I note that I'm using

Re: [xwiki-users] Using Scheduler issues (groovy questions)

2010-10-24 Thread Eugen Colesnicov
Eugen Colesnicov wrote: > > ... another bad thing - after this (manually triggered or automatically > triggered the job) the CPU for the JAVA process goes to 100%. No any logs > in a jvm or application logs ... - all look like as normal. > I found what is it!!! I am writing groovy code in a jo

Re: [xwiki-users] Using Scheduler issues (groovy questions)

2010-10-24 Thread Eugen Colesnicov
Thomas Höschele wrote: > > Could be not a script problem at all. > If you test the scheduler via triggering, you need to unschedule, then > reschedule, then trigger the job. Don't ask me why but it worked for me. > I made like you said - no result. Also I really waiting for scheduled time - al

Re: [xwiki-users] Using Scheduler issues (groovy questions)

2010-10-24 Thread Thomas Höschele
g von Eugen Colesnicov Gesendet: Sonntag, 24. Oktober 2010 17:14 An: users@xwiki.org Betreff: Re: [xwiki-users] Using Scheduler issues (groovy questions) Paul Libbrecht wrote: > > > On 24 oct. 2010, at 13:54, Sergiu Dumitriu wrote: > >>>> call the web page from groovy >

Re: [xwiki-users] Using Scheduler issues (groovy questions)

2010-10-24 Thread Eugen Colesnicov
Paul Libbrecht wrote: > > > On 24 oct. 2010, at 13:54, Sergiu Dumitriu wrote: > call the web page from groovy new java.net.URL("blablalba").getContent() >>> >>> Thanks beforehand! >>> Eugen >>> >> >> Yes, but note that the URL will be fetched without any session >> information, s

Re: [xwiki-users] Using Scheduler issues (groovy questions)

2010-10-24 Thread [Ricardo Rodriguez] eBioTIC.
Hi, Paul Libbrecht wrote: > On 24 oct. 2010, at 13:54, Sergiu Dumitriu wrote: > > call the web page from groovy new java.net.URL("blablalba").getContent() >>> Thanks beforehand! >>> Eugen >>> >>> >> Yes, but note that the URL will be fetched without any session >

Re: [xwiki-users] Using Scheduler issues (groovy questions)

2010-10-24 Thread Paul Libbrecht
On 24 oct. 2010, at 13:54, Sergiu Dumitriu wrote: >>> call the web page from groovy >>> new java.net.URL("blablalba").getContent() >> >> Thanks beforehand! >> Eugen >> > > Yes, but note that the URL will be fetched without any session > information, so if the requested page is private (not vi

Re: [xwiki-users] Using Scheduler issues (groovy questions)

2010-10-24 Thread Sergiu Dumitriu
On 10/24/2010 12:03 PM, Eugen Colesnicov wrote: > > Thanks Sergiu! > > But can I use Paul Libbrecht advise? >> call the web page from groovy >> new java.net.URL("blablalba").getContent() > > Thanks beforehand! > Eugen > Yes, but note that the URL will be fetched without any session information, s

Re: [xwiki-users] Using Scheduler issues (groovy questions)

2010-10-24 Thread Eugen Colesnicov
Thanks Sergiu! But can I use Paul Libbrecht advise? >call the web page from groovy >new java.net.URL("blablalba").getContent() Thanks beforehand! Eugen -- View this message in context: http://xwiki.475771.n2.nabble.com/Using-Scheduler-issues-groovy-questions-tp5666438p5667271.html Sent fro

Re: [xwiki-users] Using Scheduler issues (groovy questions)

2010-10-24 Thread Sergiu Dumitriu
On 10/24/2010 12:46 AM, Eugen Colesnicov wrote: > > I tried redirecting in a scheduler script. I wrote: > {{groovy}} > response.sendRedirect(xwiki.getURL("ETVCCorrespondenceCode.CronJobProgrammingCode")); > {{/groovy}} You can't redirect a scheduled job. Redirects affect HTTP responses only, and

Re: [xwiki-users] Using Scheduler issues (groovy questions)

2010-10-23 Thread Eugen Colesnicov
I tried redirecting in a scheduler script. I wrote: {{groovy}} response.sendRedirect(xwiki.getURL("ETVCCorrespondenceCode.CronJobProgrammingCode")); {{/groovy}} After this I started to using scheduler. First, I tried to trigger my job (as I understand - this button starts execution of script imme

Re: [xwiki-users] Using Scheduler issues (groovy questions)

2010-10-23 Thread Paul Libbrecht
My first hint would be to consider groovy as java. It's not exactly the same but it shares most. The other idea is to simply call the web page from groovy? new java.net.URL("blablalba").getContent() paul On 23 oct. 2010, at 23:26, Eugen Colesnicov wrote: > > Hi colleagues! > > I need some

[xwiki-users] Using Scheduler issues (groovy questions)

2010-10-23 Thread Eugen Colesnicov
Hi colleagues! I need some help for the Scheduler. I already have some not small script in a velocity. This script select some pages with complex conditions (hql), make some calculations and sending emails. Now this script is working when I simply open it page (where script is placed). I need t