1.2 Procedure

This topic explains systematic instructions to create JAVA jobs by Quartz Scheduler.

Specify User ID and Password and login to the Home screen.
  1. On Home screen, type STDJOBMT in the text box, and click Next.
    The Job Maintenance screen displays.
  2. On the Job Maintenance screen, specify the fields.
    For information on fields and their description, refer to installation documents.

    A Java job can be Stateful Job or Stateless Job.

    The following table describes the Java jobs -

    Table 1-1 Java Jobs

    Java Jobs Description
    Stateful Job If the job is configured to be Stateful then missed instances will be queued up so that the scheduler would start executing once the long-running job ends. It means there will be no parallel execution of the Java class. To make a class Stateful, add two annotations to the job class.
    • @PersistJobDataAfterExecution
    • @DisallowConcurrentExecution
    Stateless Job If the job is configured as Stateless, threads can be run in parallel and can execute the same Java class. If the job is configured as Stateless, the field Max Number Instances denotes the number of threads that can be executed in parallel. If the job is configured as Stateful, then the above value denotes the number of missed instances that will be queued up so that the quartz scheduler would start executing them once a long-running job ends. This field specifies the number of such job instances that need to be queued up.
    The class defined in the class field has to be provided with a fully qualified name.

    Note:

    Job parameters can be added to a particular java job in this screen as shown above.
    For example,

    Suppose you have created a new FTP_COPY job, to copy ftp files from one location to another. It is a java job, where the class to be executed is FtpCopy.java. You have provided the fully qualified class name as com.ofss.scheduler.quartz.ftp. FtpCopy.

    The physical location of the java file is INFRA\FCJNeoWeb\Javasource\com\ofss\scheduler\quartz\ftp\FtpCopy.java.

    In this class, you have to override the execute method of the Job class to provide the implementation logic, which is executed when the quartz scheduler executes the class. The execute method format is as below.

    Public void execute (JobExecutionContext context) throws JobExecutionException {}