• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

WSAD 5.0 Schedular with UserCalender

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am facing a problem in using Schedular with UserCalendar.
I would like to invoke the schedular job on 15th of evey month and last day of every month.

I am using the below code to set the schedular task for testing purpose. It should invoke the schedular job once in two minutes Between 9AM to 6PM everyday after the server restart.

///Setting the User Calendar
taskInfo.setUserCalendar("ejb/com/ibm/websphere/scheduler/UserCalendarHome","CRON");

///Setting the task handler
Object taskHandlerObj = initialContext.lookup("ejb/ScheduleBatchHome");
TaskHandlerHome taskHandlerHome = (TaskHandlerHome) PortableRemoteObject.narrow(taskHandlerObj, TaskHandlerHome.class);
taskInfo.setTaskHandler(taskHandlerHome);

//Setting the time interval
taskInfo.setStartTimeInterval("0 2/2 9-18 ? * MON-FRI");

//Getting the task status
TaskStatus status = scheduler.create(taskInfo);

The result of the program is that, I am able to get the job invoked exactly once after two minutes of the start of the server. There after the schedular job is not getting invoked.

When I try printing the value status.getRepeatsLeft(), it is always coming as 1.

Please let me know if I am missing anything here or I am doing anything wrong here. Kindly help me.
 
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I'm doing the same job as you but i'm using Quartz (Open Source) to do.
It's very easy to use it and it works fine.
Take a look at here http://www.quartzscheduler.org/

Good luck.
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Scheduler is part of WAS enterprise edition. Thus, you probably need WSAD-IE to test this function. You can code your application on base WSAD and then deploy on a WAS ee server.
You could always set up a remote debugging session between WSAD and the WAS ee server.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Vasanth Meduri, I'm having exactly the same problem, have you found a solution? thanks.
 
Sheriff
Posts: 3837
66
Netbeans IDE Oracle Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch, Jackson!

Given that the original post is nearly ten years old, I'm afraid we might not hear from Vasanth again. Were the existing answers in this thread useful for you?
 
jackson bi
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Martin.

The replies were not useful.
reply
    Bookmark Topic Watch Topic
  • New Topic