[xwiki-users] E-Mail Notification by Scheduler Job Script ?
Hello, I want to setup the Job Scheduler to send me an E-Mail every day to a specific Adress. But when i entered the following code of the MailSenderPlugin into the Job Script Field, i get only one Message when I save the job and not every Time the Job is fired. What am I doing wrong? THe Code is: sendTextMessage("Sender","[email protected]","Subject","text....") I know that the script should be written in Groovy, but I dont know how. Thanks for your help. -- View this message in context: http://n2.nabble.com/E-Mail-Notification-by-Scheduler-Job-Script-tp4676911p4... Sent from the XWiki- Users mailing list archive at Nabble.com.
Hello, Did you click on "Schedule" for the job to be active, after you created it ? To call it in Groovy I believe you can make something like: xwiki.mailsender.sendTextMessage(...) Jeremie 2010/3/4 Thilo <[email protected]>
Hello,
I want to setup the Job Scheduler to send me an E-Mail every day to a specific Adress.
But when i entered the following code of the MailSenderPlugin into the Job Script Field, i get only one Message when I save the job and not every Time the Job is fired. What am I doing wrong?
THe Code is:
sendTextMessage("Sender","[email protected]","Subject","text....")
I know that the script should be written in Groovy, but I dont know how.
Thanks for your help. -- View this message in context: http://n2.nabble.com/E-Mail-Notification-by-Scheduler-Job-Script-tp4676911p4... Sent from the XWiki- Users mailing list archive at Nabble.com. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Thanks for your Answer. Yes, i have clicked schedule. But I only got a Mail back when i clicked "save and view", but not when the job is fired. I'll try your suggestion and post whether it works. Is it right that I dont nedd to put between {{groovy}} and {{/groovy}} in the field for the job script. Just the code? Thanks Thilo -- View this message in context: http://n2.nabble.com/E-Mail-Notification-by-Scheduler-Job-Script-tp4676911p4... Sent from the XWiki- Users mailing list archive at Nabble.com.
Hi, On Fri, Mar 5, 2010 at 10:22 AM, Thilo <[email protected]> wrote:
Thanks for your Answer.
Yes, i have clicked schedule. But I only got a Mail back when i clicked "save and view", but not when the job is fired.
I'll try your suggestion and post whether it works. Is it right that I dont nedd to put between {{groovy}} and {{/groovy}} in the field for the job script. Just the code?
Yes, this is correct. The scheduler assumes that you'll be passing a Groovy script to it. Guillaume
Thanks Thilo -- View this message in context: http://n2.nabble.com/E-Mail-Notification-by-Scheduler-Job-Script-tp4676911p4... Sent from the XWiki- Users mailing list archive at Nabble.com. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Guillaume Lerouge Product Manager - XWiki SAS Skype: wikibc Twitter: glerouge http://guillaumelerouge.com/
Ok. Now the Scheduler and E-Mail are working fine. The right way of use ist: xwiki.mailsender.sendMessage(...) My last Problem ist how to setup more than one Recepient in the Parameters. I've tryed the following way but without success. xwiki.mailsender.sendMessage("Sender","[email protected],[email protected]","Subject","Text") Thanks for your Help! -- View this message in context: http://n2.nabble.com/E-Mail-Notification-by-Scheduler-Job-Script-tp4676911p4... Sent from the XWiki- Users mailing list archive at Nabble.com.
Got everything running. Notation was right but i made something wrong in the cron expression. Thanks for your help! Bye -- View this message in context: http://n2.nabble.com/E-Mail-Notification-by-Scheduler-Job-Script-tp4676911p4... Sent from the XWiki- Users mailing list archive at Nabble.com.
participants (3)
-
Guillaume Lerouge -
Jeremie BOUSQUET -
Thilo