Table of Contents
This chapter describes how to use JEUS Scheduler.
JEUS Scheduler is used to schedule a one-time or recurring tasks.
JEUS Scheduler is an extended feature of JEUS. Although JEUS Scheduler is similar to the timer service of EJB, JEUS Scheduler can be used in any environment including EJB environment. For example, it may be used to periodically delete temporary files and check database connections for system management.
Since Java SE Timer (java.util.Timer) cannot be directly used in the Java EE environment, EJB Timer Service or JEUS Scheduler must be used instead. EJB Timer Service can be used only in the EJB environment, while JEUS Scheduler can be used in any environment and in general Java SE applications.
Users familiar with Java SE Timer (java.util.Timer) can easily adapt to using JEUS Scheduler due to their similarities. In addition, JEUS Scheduler provides end time and max count settings not offered by Java SE Timer.
JEUS Scheduler and features can be used in the following environments.
As a standalone scheduler in Java SE applications.
As a standalone scheduler in Java EE application clients.
Connect to JEUS server scheduler service from remote environments.
Register jobs in the JEUS server configuration file.
Use JEUS server scheduler service from Java EE components.
JEUS Scheduler can be used both in user applications and on JEUS servers. JEUS server can start the scheduler service and schedule tasks remotely.
JEUS Scheduler component has the following structure.
Scheduler's service and execution method varies according to the server type.
The following figure shows the execution method by Scheduler Server.
The following describes each Scheduler Service type.
Server Scheduler Service
Used for recurring tasks. A recurring task on the server may be registered in the Job-list and executed when the server starts.
Usually used for tasks that periodically execute Java EE components (Servlet/JSP, EJB, etc.). A task can be registered in the JNDI repository for remote client use.
Client Scheduler Service
The JEUS Scheduler Service runs in a standalone mode in the application client. It is normally used to periodically execute a task in an application client. It is also used for tasks that no longer need to be executed after the client is terminated.