It's not a secret anymore!*
The moose likes BEA/Weblogic and the fly likes weblogic timer >> scheduler is running at server start up not at setting time to the notification Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "weblogic timer >> scheduler is running at server start up not at setting time to the notification" Watch "weblogic timer >> scheduler is running at server start up not at setting time to the notification" New topic
Author

weblogic timer >> scheduler is running at server start up not at setting time to the notification

chandra kunchala
Greenhorn

Joined: Aug 06, 2008
Posts: 17
Dear all,

I am using weblogic 10 server,

i've the requirement to generate a file from the perticular site on perticular time.
in my code they used the weblogic timer.

but the problem is
>> schedular is running at startup of the server time not at the specified time.
the code is like the following

public void contextInitialized(ServletContextEvent event)
{
System.out.println(">>> contextInitialized called.");
// Instantiating the Timer MBean
timer = new Timer();
// Registering this class as a listener
timer.addNotificationListener(this, null, "some handback object");
// Adding the notification to the Timer and assigning the
// ID that the Timer returns to a variable
/*
* This below code is to set the timer to the midnight
*/
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.HOUR_OF_DAY,10);
calendar.set(Calendar.MINUTE,0);
calendar.set(Calendar.SECOND,5);
Date midnight = calendar.getTime();
notificationId = timer.addNotification("oneMinuteTimer","a recurring call", this,midnight, PERIOD);


timer.start();
System.out.println(">>> timer started.");
}


that is working fine for the weblogic 8 server.

is there any extra settings required...

appreciate your reply

thanks


Thanks & Regards
Chandra SCJP5.0
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

This appears to be a WebLogic question, not an IDE question - moving.


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: weblogic timer >> scheduler is running at server start up not at setting time to the notification
 
Similar Threads
problem in job Scheduling
schedule method in timer class
Timerapp; classdefnotfound exception
javax.swing.Timer
javax.swing.Timer