I finally got a job to run in the scheduler service and set it up to run 
every hour to see if it would work out.

I got some fairly odd times of execution recorded however.

the job was setup to run every hour at 49 minutes after the hour.

I don't think it was called once at this precise time and it looks like 
called more than once an hour at some points.

my other question relates to TURBINE_SCHEDULED_JOBS... how can I switch my 
jobs back to being stored in the database? everytime I bring the server 
down I loose my scheduled tasks. I was reading somewhere about hard coding 
them into my TR.props but have not found a good resource on where to do 
this.


tdk-2.1
mysql
linux


TR.props
services.SchedulerService.classname=org.apache.turbine.services.schedule.TurbineSchedulerService
scheduler.enabled=true

scheduled job was built from the service howto..

I have a couple questions. the taskcount never incremented. this seems 
unusual unless there is a problem in the how-to code. I basically cut and 
pasted and renamed the class.

There were some problems with the how-to code though.

There does not appear to be a method for job.getId() even though all the 
howtos still show this method. I had to remove it to get the example 
working.

my run method

        public void run( JobEntry job ) throws Exception
        {


          Log.info("Scheduled job: " +
                   "task: " + job.getTask() +
                   " ran @: " + new 
Date(System.currentTimeMillis()).toString() +
                   " taskcount: " + taskcount
                  );

          // update task counter
          taskcount++;

        }

I created a Services.vm to list all actively scheduled jobs.

I found it a bit difficult to display the variables but finally figured 
out the correct attributes for job, all except Oid (I can't get an id 
every way I could think of I tried)

#foreach ( $job in $jobs)
       <tr>
         <td> $job.Oid </td>
         <td> $job.Second </td>
         <td> $job.Minute </td>
         <td> $job.Hour </td>
         <td> $job.Weekday </td>
         <td> $job.Day_of_month </td>
         <td> $job.Task </td>
         <td> $job.Email </td>
        </tr>
#end

services.vm reads
$job.Oid  0  49  -1  -1  -1  PremiumTrackerNotice  [EMAIL PROTECTED]  

after adding my job.


turbine-system.log

[Tue Jan 21 21:37:05 EST 2003] -- INFO -- Scheduled job: task: 
PremiumTrackerNotice ran @: Tue Jan 21 21:37:05 EST 2003 taskcoun
t: 0
[Tue Jan 21 22:26:05 EST 2003] -- INFO -- Scheduled job: task: 
PremiumTrackerNotice ran @: Tue Jan 21 22:26:05 EST 2003 taskcoun
t: 0
[Tue Jan 21 23:15:05 EST 2003] -- INFO -- Scheduled job: task: 
PremiumTrackerNotice ran @: Tue Jan 21 23:15:05 EST 2003 taskcoun
t: 0
[Wed Jan 22 00:04:05 EST 2003] -- INFO -- Scheduled job: task: 
PremiumTrackerNotice ran @: Wed Jan 22 00:04:05 EST 2003 taskcoun
t: 0
[Wed Jan 22 00:53:05 EST 2003] -- INFO -- Scheduled job: task: 
PremiumTrackerNotice ran @: Wed Jan 22 00:53:05 EST 2003 taskcoun
t: 0
[Wed Jan 22 01:42:05 EST 2003] -- INFO -- Scheduled job: task: 
PremiumTrackerNotice ran @: Wed Jan 22 01:42:05 EST 2003 taskcoun
t: 0
[Wed Jan 22 02:31:05 EST 2003] -- INFO -- Scheduled job: task: 
PremiumTrackerNotice ran @: Wed Jan 22 02:31:05 EST 2003 taskcoun
t: 0
[Wed Jan 22 03:20:05 EST 2003] -- INFO -- Scheduled job: task: 
PremiumTrackerNotice ran @: Wed Jan 22 03:20:05 EST 2003 taskcoun
t: 0
[Wed Jan 22 04:09:05 EST 2003] -- INFO -- Scheduled job: task: 
PremiumTrackerNotice ran @: Wed Jan 22 04:09:05 EST 2003 taskcoun
t: 0
[Wed Jan 22 04:58:05 EST 2003] -- INFO -- Scheduled job: task: 
PremiumTrackerNotice ran @: Wed Jan 22 04:58:05 EST 2003 taskcoun
t: 0
[Wed Jan 22 05:47:05 EST 2003] -- INFO -- Scheduled job: task: 
PremiumTrackerNotice ran @: Wed Jan 22 05:47:05 EST 2003 taskcoun
t: 0
[Wed Jan 22 06:36:05 EST 2003] -- INFO -- Scheduled job: task: 
PremiumTrackerNotice ran @: Wed Jan 22 06:36:05 EST 2003 taskcoun
t: 0
[Wed Jan 22 07:25:05 EST 2003] -- INFO -- Scheduled job: task: 
PremiumTrackerNotice ran @: Wed Jan 22 07:25:05 EST 2003 taskcoun
t: 0
[Wed Jan 22 08:14:05 EST 2003] -- INFO -- Scheduled job: task: 
PremiumTrackerNotice ran @: Wed Jan 22 08:14:05 EST 2003 taskcoun
t: 0
[Wed Jan 22 09:03:05 EST 2003] -- INFO -- Scheduled job: task: 
PremiumTrackerNotice ran @: Wed Jan 22 09:03:05 EST 2003 taskcoun
t: 0


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to