Hitachi

JP1 Version 12 JP1/Automatic Job Management System 3 System Design (Work Tasks) Guide


3.5.1 Establishing schedules for applications that extend over two days

A work task executed late at night will often extend over more than one day. Sometimes the date change can lead to the system reporting a scheduling error. For example, suppose that you calculate the daily sales data from Monday to Friday at 1:00 a.m. on the following day, and Saturdays are closed days. If you set the start time for the calculation process to 1:00 on the following day, the calculation of Friday's sales data will be scheduled to begin at 1:00 on Saturday. However, because Saturday is a closed day, the calculation process cannot be executed.

By setting 25:00 as the start time, you can ensure that the calculation process is executed even when Saturday is a closed day. However, sometimes the root jobnet and the nested jobnet will be scheduled to execute on different days. As a result, the nested jobnet might fail to execute.

In such cases, you can change the length of time that JP1/AJS3 treats as 1 day, so that a process that runs over two days can fit within 1 day under JP1/AJS3. You can use one of the following methods to change the length of time that JP1/AJS3 treats as one day.

We recommend that you use the 48-hour schedule to define the schedule of the root jobnet. This method enables you to create schedules more easily. Each method is described below.

Organization of this subsection

(1) Defining an application that extends over two days using a 48-hour schedule

If you define the schedule of the root jobnet using the 48-hour schedule, the time between 0:00 and 23:59 on the next day in the calendar is treated as part of the current day, from 24:00 to 47:59. For example, you can refer to 1 a.m. on Saturday as 25:00 on Friday. If Saturday is a closed day, as in the example above, you can use the 48-hour schedule and set the execution start time to 25:00 on Friday. This will allow the job to execute on schedule.

The following figure shows the difference between a 24-hour schedule and a 48-hour schedule.

Figure 3‒2: Difference between a 24-hour schedule and a 48-hour schedule

[Figure]

If you specify the execution start time as an absolute time under the 48-hour schedule (base time 0:00), it can be expressed in two different ways. For example, a job that executes 3 a.m. can be expressed as 8/1 27:00 or 8/2 3:00. Although the actual time is the same, the scheduled execution date is different. This means that when the schedule is affected by closed days/open days, or by shifting the execution schedule, the application may not be executed.

Note that if you use the 24-hour schedule, you can still specify a time between 24:00 and 47:59. However, if for example you specify the time 8/1 27:00 under the 24-hour schedule, it is interpreted as 8/2 3:00, and the schedule will be set accordingly.

(a) Changing the time system from the 24-hour schedule to the 48-hour schedule

To set up a schedule for a jobnet based on the 48-hour schedule, you need to set up the environment for the scheduler service.

To change a schedule from the 24-hour schedule to the 48-hour schedule:

  1. Change the value of the ROOTJOBNETSCHEDULERANGE environment setting parameter of the scheduler service to 00000030.

  2. Specify a base time of 0:00 in the details of the job group.

    If you do not specify a base time, the default is used.

  3. Specify a time later than 24:00 as the execution start time for the jobnet.

For details about how to set environment setting parameters, see 4.2 Environment setting parameter settings in the JP1/Automatic Job Management System 3 Configuration Guide (for Windows systems), or 14.2 Environment setting parameter settings in the JP1/Automatic Job Management System 3 Configuration Guide (for UNIX systems).

(b) Reviewing schedules after changing to the 48-hour schedule

When you change the schedule of a root jobnet from the 24-hour to the 48-hour schedule, the behavior of the schedule for the root jobnet will change. You should therefore review existing schedules after changing them to the 48-hour schedule. You should change the schedule rules for a jobnet when they meet any of the following conditions:

  1. You defined a time later than 24:00 as the execution start time for the root jobnet.

    This causes the execution start date to change for the root jobnet and nested jobnets. Check the schedule definitions.

  2. You defined an exclusive schedule for a jobnet or planning group that is in the same hierarchy as a jobnet that meets the condition 1 above.

    This causes the execution start date of the exclusive schedule to change. Check the schedule definitions.

  3. A jobnet that meets conditions 1 or 2 above contains a nested jobnet whose schedule does not depend on the upper-level jobnet.

    This causes the execution start date of the nested jobnet to change. Check the schedule definitions.

  4. The base time is other than 0:00.

    Review the schedule definitions for root jobnets and nested jobnets because the way time is handled changes for the following items of the schedule rules:

    • Execution start time

    • Start delay time

    • End delay time

    • Valid range of a start condition

    For information about how time is handled when a time other than 0:00 is specified for the base time, see 3.3.2 Defining a schedule in the manual JP1/Automatic Job Management System 3 Overview.

(2) Defining applications that extend over two days by changing the base time

Normally, JP1/AJS3 considers 1 day to be the 24 hours between 0:00 on a certain day and 0:00 on the next day. By shifting the time when 1 day starts, you can fit processes that run over two different days into one day. For example, if you set the base time to 8:00, JP1/AJS3 treats the 24 hours from 8:00 until 8:00 the next day as 1 day. The time from 0:00 until 7:59 on the current day is counted as part of the previous day.

Changing the base time can complicate the applications involved in schedule definition, such as setting execution start times and delay times. For example, you must specify the time in different ways depending on the type of execution start time. When the base time is 8:00, you can specify a start time of 1:00 on August 5 in one of the ways shown below.

Table 3‒3: Setting an execution start time

Type of execution start time

Type of execution start date

Time specified

Absolute time

Registered day, Absolute day, Relative day

8/5 1:00 (alternatively 8/4 25:00)

Absolute time

Open day, Closed day

8/4 1:00

Relative time

All

8/4 17:00

(a) When a start condition is defined for a jobnet

Imagine you are using the 24-hour schedule, and have set the base time to a value other than 0:00. If you specify a start condition for a jobnet, and an end time for the start condition that is later than 24:00 but earlier than the base time, the end time of the start condition is treated as falling on the day after next. The following figure shows an example where this happens.

Figure 3‒3: End time of the start condition becomes the day after next

[Figure]

From this example, it is apparent that if you have set the base time to a value other than 0:00, specifying a time between 0:00 (24:00) and the base time is complicated. We therefore recommend that you use the 48-hour schedule to define the schedule.