Thanks, it did the trick:
JobScheduler sched = (JobScheduler)
CocoonComponentManager.getSitemapComponentManager().lookup(JobScheduler.clas
s.getName());
StartProcessJob sq = new StartProcessJob();
Map<String,String> jobData = new HashMap<String,String>();
jobData.put("pcid", "3505");
jobData.put("initiatorId", "2488");
sched.addJob("job", sq, "*/30 * * * * ? *", false, null, jobData);
Regards, B
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Giacomo Pati
Sent: Tuesday, December 06, 2005 8:57 AM
To: [email protected]
Subject: Re: CocoonQuartzJobScheduler
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Have a look at the o.a.c.components.cron.JobScheduler interface. You need to
get the implementation of that interface by use of the
ServiceManager/ComponentManager.
JobScheduler js = serviceManager.lookup(JobScheduler.class.getName());
On Sat, 3 Dec 2005, B Z wrote:
> Date: Sat, 3 Dec 2005 10:38:42 +0100
> From: B Z <[EMAIL PROTECTED]>
> Reply-To: [email protected]
> To: [email protected]
> Subject: CocoonQuartzJobScheduler
>
> Hi.
>
> I have enabled
> org.apache.cocoon.components.cron.CocoonQuartzJobScheduler
> component in cocoon.xconf and it seems to be working fine. But I do
> not know how to schedule tasks programatically with this scheduler as
> I could do it with Quartz Scheduler.
>
> For example, how would I create a scheduled task like the one below
> which I made with Quartz:
>
> SchedulerFactory sf = new StdSchedulerFactory();
> Scheduler sched = sf.getScheduler();
> sched.start();
> JobDetail jd = new JobDetail("Income report", "Report generation",
> Quartz.class);
> jd.getJobDataMap().put("type", "FULL");
> CronTrigger trigger = new CronTrigger("Income report", "Report
> generation");
> trigger.setCronExpression("*/10 * * * * ? *");
> sched.scheduleJob(jd, trigger);
>
> Since Cocoon Scheduler is based on Quartz scheduler I would expect it
> to be easy but I havent been able to do it and I did not found any
examples.
>
> Examples would be appreciated.
>
> Thanks!
> Borut
>
>
> ____________________
> http://www.email.si/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
- --
Giacomo Pati
Otego AG, Switzerland - http://www.otego.com Orixo, the XML business
alliance - http://www.orixo.com -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
iD8DBQFDlUQ2LNdJvZjjVZARAieuAJ9MBEYTf+KnfF/mb/LaqNTlJbFdiQCcD2eV
s3vkMSqVdEGJMuzc61JkKX4=
=SHId
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]