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);