cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <giac...@apache.org>
Subject Re: CocoonQuartzJobScheduler
Date Tue, 06 Dec 2005 07:56:37 GMT
-----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 <zagarb@email.si>
> Reply-To: users@cocoon.apache.org
> To: users@cocoon.apache.org
> 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: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>

- -- 
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: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message