You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Nathan Mcminn <NM...@theblragency.com> on 2004/04/06 18:28:32 UTC

Scheduled job question

I'm having a bit of a problem with the Scheduler.  I would like to make
certain scheduled jobs available to run on demand.  I have a Turbine
action called SchedulerActions defined, and in that class's doExecute
method I have set up a bit of code to load the requested job and execute
it immediately.  Looks like this:
 
JobEntry je = TurbineScheduler.getJob(Integer.parseInt(id_of_job));
ScheduledJobLoader.getInstance().exec(je, je.getTask());
 
Now this code returns fine, no exceptions thrown.  However, the run()
method of my scheduled job is never being reached.
 
--------------------------------------------
Nathan McMinn
Application Developer
NequalsOne - HealthCare marketing tools
mailto:nmcminn@NequalsOne.com
http://www.NequalsOne.com 
 

RE: Scheduled job question

Posted by mkblueyonder <mi...@blueyonder.co.uk>.
Hi Nathan,
In your scheduled jobs have a plain run method e.g.
	public void run()
as well as
	public void run(JobEntry job)
Then refactor all the run processing into another method.
Worked well for me.
job doesn't contain alot of information IFAICR. A blob
or something similar.
Best Regards,
Malcolm Kendall, NetVisionIT 

-----Original Message-----
From: Nathan Mcminn [mailto:NMcminn@theblragency.com]
Sent: 06 April 2004 17:29
To: turbine-user@jakarta.apache.org
Subject: Scheduled job question


I'm having a bit of a problem with the Scheduler.  I would like to make
certain scheduled jobs available to run on demand.  I have a Turbine
action called SchedulerActions defined, and in that class's doExecute
method I have set up a bit of code to load the requested job and execute
it immediately.  Looks like this:
 
JobEntry je = TurbineScheduler.getJob(Integer.parseInt(id_of_job));
ScheduledJobLoader.getInstance().exec(je, je.getTask());
 
Now this code returns fine, no exceptions thrown.  However, the run()
method of my scheduled job is never being reached.
 
--------------------------------------------
Nathan McMinn
Application Developer
NequalsOne - HealthCare marketing tools
mailto:nmcminn@NequalsOne.com
http://www.NequalsOne.com 
 


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org