+

Search Tips   |   Advanced Search

 

Scheduler calendars

 

The scheduler provides stateless session bean interfaces which allow creating common calendars which can be used by the scheduler and any J2EE application.

The SchedulerCalendars.ear application is available and provides a default UserCalendar EJB implementation which allows using the SIMPLE and CRON calendars. Although this application is not required when using the scheduler, it is available to use from any J2EE application.

For details on how the SIMPLE and CRON calendars behave, see the API documentation for the com.ibm.websphere.scheduler.UserCalendar interface.

Specifying a UserCalendar with the scheduler

A UserCalendar is specified using the setUserCalendar() method of the TaskInfo interface of the scheduler. This interface allows you to select the JNDI name of the home interface of a UserCalendar bean. Because some UserCalendar bean implementations might handle multiple types of calendars, the interface also allows you to optionally select which type of calendar to use. A list of valid calendar types can be retrieved by invoking the getCalendarNames() method of the UserCalendar interface.

If the setUserCalendar() method is not invoked, or if a value of null or empty-string is specified for the home JNDI name parameter, then the default UserCalendar is used internally by the scheduler. When the default UserCalendar is accessed internally, it is not necessary that the SchedulerCalendars.ear system application be installed.

You might want to use the default UserCalendar directly in your other J2EE applications, apart from the scheduler. In this case, you may use the UserCalendarHome.DEFAULT_CALENDAR_JNDI_NAME value to look up the default UserCalendar from your applications. You may also supply this value to the setUserCalendar() method of the TaskInfo interface. You will need to ensure the SchedulerCalendars.ear system application was either automatically installed or that you have installed it manually.


 

Related tasks


Installing default scheduler calendars
Example: Using default scheduler calendars
Configure schedulers
Developing and scheduling tasks

 

Related Reference


Schedulers collection
Interoperating with schedulers

 

Related information


Example: Stopping and starting scheduler daemons using Java Management Extensions API
Example: Dynamically changing scheduler daemon poll intervals using Java Management Extensions API