Eric,
Yes, but I have not had the time yet, later in the week I should. I am
limited in how much time I can spend on it so it is likely to be just the
enable() and disable() methods, maybe, run() if I get time. It is not up to
me which versions it gets into. I don't think much has changed with
scheduler in Fulcrum and thus the 2.2 release coming up. T3 I have no idea.
I should mention below that you have to make certain you subclass
ScheduledJob for the class you want to run as in 'task' in the listing
below. ala
public class FileRetrieve extends ScheduledJob implements RwtResourcesKeys
{
...
}
Thus String task="FileRetrieve";
I remember some folk managed to miss this point even thou it is in the
documentation.
David
-----Original Message-----
From: Pugh, Eric [mailto:[EMAIL PROTECTED]]
Sent: 08 January 2002 15:18
To: 'Turbine Users List'
Subject: RE: Sceduled jobs!
David,
I believe you are adding the ability to do 1 time only sheduled jobs? Will
that code go into T2 or T3? I can't wait to see it. If I compile it, and
put it in my o.a.t.services.scheduler directory, then those classes will be
used instead of what is in the jar, correct?
Eric
-----Original Message-----
From: David Wynter [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 08, 2002 10:10 AM
To: Turbine Users List
Subject: RE: Sceduled jobs!
Fabio,
This is pretty much straight out of the section on services in the
documentation:
//access the service singleton
ScheduleService ss =
(ScheduleService)TurbineServices
.getInstance()
.getService(ScheduleService.SERVICE_NAME);
//create a new JobEntry with the time constraints
from
//the template as the arguments
JobEntry je = new JobEntry(second,
minute,
hour, dow, dom, task);
//set the email for notification
je.setEmail("");
taskProps.put("rwScheduleId",
schedule.getPrimaryKey());
taskProps.put("linkedtaskdelay",
parser.getString("runafter","120"));
//add the HashMap of arguments
je.setProperty(taskProps);
//add the job to the queue
ss.addJob(je);
Have fun. For the values of second, minute, hour etc. see the JavaDoc. There
is a properties file version as well of you don't want to use the database
to store the job entries.
David
-----Original Message-----
From: Fabio Daprile [mailto:[EMAIL PROTECTED]]
Sent: 08 January 2002 14:32
To: [EMAIL PROTECTED]
Subject: Sceduled jobs!
Hi,
I've come to the point, in my application development, where i have to
design jobs that need to run at fixed intervals (each week typically)
I know there is a Sceduling service, but have no idea how to use it.
Somebody can help me with a clear and simple example.
Thx very much!
Fabio
--
W�rth Phoenix Srl
Via Kravogl 4, I-39100 Bolzano
Tel: +39 0471/564111
Fax: +39 0471/564122
mailto:[EMAIL PROTECTED]
http://www.wuerth-phoenix.com
--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>