3.3.2 Defining a schedule
To calculate a jobnet execution schedule, you need to define schedule information including the start date/time, execution cycle, and how to reschedule an execution date that falls on a holiday.
- Organization of this subsection
(1) Defining a schedule rule
A schedule rule prescribes a particular requirement for calculating an execution schedule, such as the execution date/time and processing cycle (execution cycle) of a jobnet, or how to reschedule an execution date that falls on a holiday. The jobnet's execution schedule is determined from such schedule rules.
You can set up to 144 schedule rules for a jobnet. When multiple schedules have been defined, they are applied in order of the time settings in the schedule rules. When the same start time is defined in two or more schedule rules, the schedules are applied in order of the schedule rule numbers.
For details on defining multiple schedule rules, see 3.5.2 Setting multiple execution start times in the JP1/Automatic Job Management System 3 System Design (Work Tasks) Guide.
By default, JP1/AJS3 calculates the execution schedule of a nested jobnet according to the schedule rule for the upper-level jobnet. However, you can set schedule rules specifically for a nested jobnet. To set a schedule rule for a nested jobnet, you assign a rule number to the schedule rule set for the upper-level jobnet and link the schedule rule for the nested jobnet to that schedule. For details on defining a schedule for a nested jobnet, see 3.5.3 Defining a different schedule for some jobs in a jobnet in the JP1/Automatic Job Management System 3 System Design (Work Tasks) Guide.
The details that you can set in a schedule rule are described next.
(a) Setting the execution start time
There are a number of ways of setting an execution start time, depending on various factors such as whether a base day and base time have been set, and whether the root jobnet is based on a 24-hour or 48-hour time format. To define a schedule that spans days or starts at or after 24:00, we recommend that you use a 48-hour schedule without setting a base time (i.e., base time is 0:00). For details, see 3.5.1(1) Defining an application that extends over two days using a 48-hour schedule in the JP1/Automatic Job Management System 3 System Design (Work Tasks) Guide.
■ Setting the start date
JP1/AJS3 determines the date for executing a jobnet from the following three settings.
- Type
-
Method of setting the start date. Set one of the following five options:
-
Registered day
Start the jobnet on the date it was registered for execution. With this setting, you do not need to set the start date.
-
Absolute day
Start the jobnet on the date set in the calendar (where each month begins on the 1st).
-
Relative day
Calculate the jobnet start date from the base day set in the calendar information.
-
Open day
Calculate the jobnet start date from the base day set in the calendar information, counting only open days.
-
Closed day
Calculate the jobnet start date from the base day set in the calendar information, counting only closed days.
-
- Start year and month
-
Calendar year and month for starting the jobnet.
- Start day
-
Set one of the following three options:
-
Specify day
Specify which day of the month to start the jobnet.
-
Specify end of month
Specify how many days before the last day of the month to start the jobnet.
-
Specify day of the week
Specify which week and which day of the week to start the jobnet.
-
The following tables shows how the Start day options relate to the selected Type setting.
Type |
Start day option |
Explanation |
---|---|---|
-- |
-- |
|
Specify day |
Specify a calendar date in the form [ ]th day. |
|
Specify end of month |
Specify the number of days before the end of the calendar month in the form [ ] days before last day. |
|
Specify day of the week |
Specify the day of the week, counting from the start of the calendar month, in the form ordinal number and [ ]th week and day of the week. |
|
Specify day |
Specify a date, counting from the date set as the base day, in the form [ ]th day. |
|
Specify end of month |
Specify the number of days before the end of the month, where a month is the period calculated from the set base day, in the form [ ] days before last day. |
|
Specify day of the week |
Specify the day of the week, counting from the date set as the base day, in the form [ ]th week and day of the week. |
|
Specify day |
Specify an open day, counting only the open days from the date set as the base day, in the form ordinal number. |
|
Specify end of month |
Specify the number of open days before the end of the month, where a month is the period calculated from the set base day, in the form [ ] open days before last day. |
|
Specify day |
Specify a closed day, counting only the closed days from the date set as the base day, in the form ordinal number. |
|
Specify end of month |
Specify the number of closed days before the end of the month, where a month is the period calculated from the set base day, in the form [ ] closed days before last day. |
- Legend:
-
-- : The start day is not specified.
■ Setting the start time
You can set the execution start time from 0:00 to 47:59 (minutes).
The time can be set in either of two ways:
- Absolute time
-
Absolute time is the real time by the system clock.
Using absolute time, you can set a schedule by clock time, regardless of whether a base time is set.
- Relative time
-
Relative time is the time relative to a base time that is treated as 0:00.
The following figure illustrates the difference between relative time and absolute time.
|
In this example, the base time is set to 8:00. If relative times are specified, the base time of 8:00 in absolute time will be 0:00 in relative time. Thus, 12:00 in absolute time will be 4:00 in relative time, and 24:00 in absolute time will be 16:00 in relative time.
The following figure shows how time settings differ in absolute time and relative time when a base time is set.
|
When you use relative time, the specified date matches the date in the JP1/AJS3 calendar. When you use absolute time, however, the date in JP1/AJS3 may differ from the specified date and time because the boundary between one day and the next shifts according to the base time.
The Type option can also affect the behavior of date and time settings. The following figure shows how dates and times are handled in JP1/AJS3 when the time is set in absolute time and a base time is set.
|
-
When Type is set to Absolute day, Relative day, or Registered day
The period from 0:00 to the base time is within the previous day in absolute time.
The times in this example are handled as follows:
- Using a 24-hour time format
-
The period from 0:00 to 7:59 is handled as within 8/1. The period from 8:00 to 23:59 on 8/2 and the period from 0:00 to 7:59 on 8/3 together constitute 8/2 in JP1/AJS3.
- Using a 48-hour time format
-
The period from 8:00 to 47:59 on 8/2 is handled as within 8/2. The period from 0:00 to 7:59 on 8/4 when using a 48-hour time format will extend beyond the 48 hours in absolute time. Because it is not possible to specify a time on or after 48:00 under the absolute time specification, the period from 0:00 to 7:59 on 8/4 is handled as belonging not to 8/2 but to 8/3.
-
When Type is set to Open day or Closed day
Because dates are determined relative to the base time, the date in JP1/AJS3 will be the same as the specified date, but a break occurs in the time continuum.
From these considerations, when you are creating a schedule that spans days or begins at or after 24:00, we recommend that you use a 48-hour schedule without setting a base time. For details about using a 48-hour schedule, see 3.3.1(2) 48-hour schedule.
When you use a 48-hour format without setting a base time (i.e., base time is 0:00), the date on JP1/AJS3 matches the specified date, and times are handled in a time series. This makes time specification clearer and simpler.
The following figure shows how time settings are handled with a 48-hour schedule.
|
(b) Processing cycle
A processing cycle is a cycle for executing a jobnet. By setting a processing cycle, you can run a jobnet weekly, every three days, or at other regular intervals.
The execution dates in a processing cycle may differ according to the option set in Start day. An example of how the Start day option affects the execution date is shown below. The processing cycle here is monthly.
|
In example 1, the execution date is always the 1st of every month, beginning from the start year and month (Execute without shift specified). In example 2, the execution date is the first Thursday of every month. In example 3, the execution date is the fifth open day every month.
(c) Substitute schedule of closed day job
The Substitute schedule of closed day job option specifies how to handle a scheduled jobnet when its execution date falls on a closed day.
- Substitute schedule methods
-
You can set any of the following four options for rescheduling a jobnet when the execution date falls on a closed day:
-
Do not execute
Do not reschedule the jobnet even if its scheduled execution date falls on a closed day. Do not execute the jobnet.
Do not select this option when a closed day is set as the start date. Otherwise, the execution schedule will not be calculated, even if the jobnet was registered for planned execution or fixed execution.
-
Execute on previous open day
Execute the jobnet on the nearest open day before the closed day.
-
Execute on next open day
Execute the jobnet on the nearest open day after the closed day.
-
Execute without shift
Do not reschedule the jobnet. If the JP1/AJS3 - Manager service is active, execute the jobnet on the closed day. If the JP1/AJS3 - Manager service is inactive, set the jobnet to Skipped so not executed status.
-
- Maximum shiftable days
-
Max. shiftable days means the maximum number of days that a jobnet's execution date can be rescheduled (shifted) when it falls on a closed day. You can set Max. shiftable days when you set Execute on previous open day or Execute on next open day as the substitute schedule method.
In the following example, Execute on next open day is set as the substitute schedule method and Max. shiftable days is set to 5 days.
Figure 3‒35: Example of a substitute schedule of closed day job Because Execute on next open day is set as the substitute schedule method, JP1/AJS3 looks for the nearest open day within the set maximum shiftable days (5 days).
In this example, however, the next four days (8/6, 8/7, 8/8, and 8/9) are also closed days. Therefore, the start day is rescheduled to the fifth open day.
If an open day is available within the set maximum shiftable days, the jobnet will be rescheduled even if its start date is outside the valid term of the schedule rules. For details about the valid term of schedule rules, see (2) Valid term of schedule settings.
-
Substitute schedule of closed day job and calendar information
-
When a jobnet starts at or after 24:00 (between 24:00 and 47:59), the substitute schedule is calculated according to the JP1/AJS3 calendar date. For example, suppose that a jobnet is originally scheduled to run at 25:00 on August 6 (actually 1:00 on August 7 by the ordinary calendar). Because July 6 is a closed day, the jobnet is shifted to the next day. The rescheduled execution date will therefore be 25:00 on July 7 (actually 1:00 on July 8).
-
When a jobnet has been registered for planned execution, and you alter the calendar information after JP1/AJS3 has set a substitute schedule for a closed day, the jobnet will be rescheduled according to the new calendar information. For example, suppose that the jobnet has been shifted to the 6th because the 5th is a closed day. If you then alter the calendar information, making the 5th an open day, the jobnet will be rescheduled to run on the 5th. However, a jobnet registered for fixed execution will not be rescheduled if you alter the calendar information. For details about registering a jobnet for execution, see 4. Executing an Application.
-
-
Substitute schedule of closed day job and the processing cycle
When a processing cycle is specified, if there are no open days within the set Max. shiftable days, the system looks for a shift day within the set maximum period from the next scheduled execution date (processing cycle).
When multiple schedules are defined on the same day and at the same time, the jobnet actually runs once. Therefore, if the shift day falls on the date scheduled for the next processing cycle, the jobnet will be executed once only. Thus, if a daily processing cycle is set (Execution every 1 Day), the system cannot reschedule the jobnet. When using a processing cycle, make sure that you set Max. shiftable days to less than the number of days to the next run (the period set for the processing cycle).
-
Substitute schedule of closed day job and Change plan settings
The Substitute schedule of closed day job settings do not apply when you temporarily change the next scheduled start day and the new execution date falls on a closed day. The jobnet will be executed on that closed day, provided the JP1/AJS3 - Manager service is running. For details about temporarily changing a schedule, see 4.5.3 Temporarily changing the execution start time of a jobnet.
(d) Start condition
A start condition is a condition for executing a jobnet at a time other than the specified execution start time. As a start condition, you can define an event job that monitors the system for a specific event. When you set a start condition, you must also define in a schedule rule whether to use that condition. For details on start conditions, see 3.4 Defining a start condition.
(e) Valid range of start condition
When a start condition is set for a jobnet, you must specify in advance the valid range of that start condition. You can set the valid range in any of three ways:
-
Specify how many times to run the jobnet when its start condition is satisfied.
-
Specify the valid range in absolute time.
-
Specify the valid range in relative time from the scheduled monitoring start time.
When you register the jobnet for planned execution or fixed execution, the JP1/AJS3 system ceases monitoring the start condition in accordance with the valid range definition that you set.
For details on the valid range of a start condition, see 3.4 Defining a start condition.
(f) Monitor delay
The Monitor delay option determines whether a jobnet started and ended at the expected times, as set in its execution schedule.
Jobnets can be monitored for end delays based on the elapsed time since the jobnet started execution. Alternatively, start delays and end delays can be monitored using a time threshold set as a delay judgment criterion.
- End delay monitoring based on the elapsed time since the jobnet started
-
Using this method, you set the time required for execution for the jobnet. An end delay is detected if the jobnet's execution time exceeds the set duration. If the set duration is exceeded, a delay is reported (a JP1 event is issued and the jobnet status changes in JP1/AJS3 - View or the Web GUI). However, even if a delay occurs, execution of the jobnet is not suspended.
Note that delay monitoring can be set for nested jobnets. For details about jobnet monitoring based on time required for execution, see the description of jobnet monitoring in 3.1.1(2) Jobnets.
- End delay and start delay monitoring based on delay judgment criteria
-
Using this method, you set a time threshold as the delay judgment criterion. A start delay or end delay is detected if the set time is exceeded.
You can set the criterion in absolute time (in the range 0:00 to 47:59) or relative to the jobnet's start time (in the range 1 to 2,879 minutes). If the time set by either of these methods is exceeded, the delay is reported (a JP1 event is issued and the jobnet status changes in JP1/AJS3 - View or the Web GUI). Note that a delay does not mean that execution of the jobnet is canceled.
You can also set delay monitoring for a nested jobnet, using any of the following four methods:
-
Set by absolute time
-
Set by relative time from the start time of the root jobnet
-
Set by relative time from the start time of the upper-level jobnet (jobnet at one level higher)
-
Set by relative time from the start time of the nested jobnet
-
To monitor delays in a jobnet whose execution schedule extends into the next day or starts at 24:00 or later, we recommend that you use a 48-hour schedule without setting a base time (that is, the base time is 0:00). For details, see (a) Setting the execution start time. See also 3.5.1(1) Defining an application that extends over two days using a 48-hour schedule in the JP1/Automatic Job Management System 3 System Design (Work Tasks) Guide.
- Supplementary notes
-
-
Be careful if you use an absolute time to specify the start delay or end delay monitoring time when a base time (other than 0:00) is set for the calendar definition used by the jobnet. In this case, although dates are calculated based on the base time, a break occurs in the time continuum. Take special care when you attempt to specify 24:00 or later. In this case, the time that is actually specified might be different from the intended time.
When a base time is set, the delay monitoring time is handled as shown in the following figure.
Figure 3‒36: How delay monitoring time is handled As shown above, if the delay monitoring time of a jobnet to be executed on August 2 is set to 26:00 as an absolute time with a base time of 8:00, the actual specified time is 2:00 on August 4.
-
Delay monitoring is not performed if the jobnet has already entered Ended status. This occurs, for example, when a preceding unit terminates abnormally and the succeeding jobnet is not executed and enters Not executed + Ended status.
-
Delay monitoring restarts if the jobnet is re-executed and once again enters Waiting for start time or Waiting for prev. to end status. However, if a start delay was detected at the first run, the rerun jobnet is not monitored for a start delay, even if it enters Waiting for start time or Waiting for prev. to end status. This is also true for an end delay.
-
When monitoring for a start delay or end delay is set for a dependent jobnet, if the preceding judgment job exceeds the set monitoring time without terminating, a delay will be detected even if the dependent jobnet is not executed. You can avoid detection of an end delay in such cases by monitoring the jobnet based on its time required for execution.
-
If you set both of the following types of end delay monitoring, a delay is reported (a JP1 event is issued and the jobnet status changes in JP1/AJS3 - View or the Web GUI) upon the first detection. When a delay is detected and monitored in one type of delay, the delay in the other type of delay monitoring is not monitored.
- End delay monitoring according to the elapsed time from the start of execution of a jobnet
- End delay monitoring starting from the time set as the delay judgment criterion
-
(g) Schedule by days from start
Schedule by days from start means rescheduling a jobnet by counting forward or backward from the execution date already determined from the start date/time, processing cycle, substitute schedule for closed days, or other schedule settings.
- Rescheduling methods
-
There are two methods of rescheduling a jobnet by counting days from the scheduled start time:
-
Open-day basis
When calculating on an open-day basis, the next execution day is calculated from the schedule settings (such as the scheduled start time, processing cycle, and closed-day substitution) and then shifted backward or forward by counting only open days.
-
All-day basis
When calculating on an all-day basis, the next execution day is calculated from the schedule settings (such as the scheduled start time, processing cycle, and closed-day substitution) and then shifted backward or forward by counting both open days and closed days.
In other words, you can select one of the following four rescheduling methods:
-
Execute n open days before the scheduled start time
-
Execute n open days after the scheduled start time
-
Execute n days before the scheduled start time
-
Execute n days after the scheduled start time
In n, set the number of days to count.
- (Example 1) Execute 2 open days before the scheduled start time
-
In the following example, a jobnet is rescheduled by setting Execution: 2 open days before start time in Schedule by days from start.
Figure 3‒37: Example 1 of rescheduling a jobnet The start time is counted back two open days from the scheduled start time on August 8. Therefore, the jobnet will now execute on August 4.
- (Example 2) Execute 2 days after the scheduled start time
-
In the following example, a jobnet is rescheduled by setting Execution: 2 days after start time in Schedule by days from start.
Figure 3‒38: Example 2 of rescheduling a jobnet A jobnet that was scheduled to be executed on August 8 is rescheduled to be executed two days later, regardless of whether the two days include closed days. Therefore, the jobnet will now execute on August 10.
-
- Max. shiftable days
-
For rescheduling on an open-day basis, you can specify the maximum number of days by which the next execution day can be shifted (Max. shiftable days). The maximum shiftable days includes the number of closed days.
If the next rescheduled execution time falls outside the maximum shiftable days, execution is not scheduled for that time.
In the following example, Execution: 2 open days before start time is set in Schedule by days from start, and Max. shiftable days is set to 5 days.
Figure 3‒39: Example of max. shiftable days Two open days before the start time falls outside the set maximum shiftable days (5 days). Therefore, execution is not scheduled for August 2.
For details on defining a jobnet using the Schedule by days from start function, see 3.5.5 Shifting the scheduled execution date forward or back based on a calculated schedule (Schedule by days from start) in the JP1/Automatic Job Management System 3 System Design (Work Tasks) Guide.
(2) Valid term of schedule settings
You can set the period for which a schedule rule defined for a jobnet is applicable.
The valid term of a schedule rule (date on which it expires) can be set separately for each jobnet. When the specified date arrives, the jobnet automatically stops being executed.
(3) Schedule options
JP1/AJS3 provides the following two options for defining schedule information:
-
Refer to a calendar of another job group
-
Exclusive schedule
These options are described below.
For details on schedule options for a nested jobnet, see also 3.5.3 Defining a different schedule for some jobs in a jobnet in the JP1/Automatic Job Management System 3 System Design (Work Tasks) Guide.
(a) Refer to a calendar of another job group
When defining a jobnet, if you need to consider the operational information set for another job group, you can refer to that job group's calendar information as the operational calendar for the jobnet you are defining.
Note that when you schedule a jobnet based on the calendar information of another job group, the Monthly Schedule and Daily Schedule windows show the execution schedule using the calendar information of the job group to which that jobnet belongs.
For details on calendar information, see 3.2 Defining a calendar for JP1/AJS3 operation.
- Cautionary note
-
If a jobnet is registered for planned execution or for fixed execution by specifying the number of future generations, performing any of the operations below will disable schedule calculations. As a result, the jobnet might be placed in Shutdown status or the execution schedule might not be created. Cancel registration before you execute any of these operations:
-
Change the job group specified in the schedule definition as the job group whose calendar is to be referenced.
-
Delete the job group whose calendar is to be referenced.
-
Rename the job group whose calendar is to be referenced.
-
Execute the ajsdefine command with the -i or -f option specified to update the job group whose calendar is to be referenced.
-
(b) Exclusive schedule
You can set an exclusive schedule so that the jobnet you are defining will not be executed if its execution schedule coincides with that of another jobnet, and you do not want them to run on the same day.
The following figure shows an example of using an exclusive schedule.
|
In this example, the daily jobnet runs every day and the weekly jobnet runs on Fridays. When these two jobnets are executed, their execution dates will coincide on Fridays. The weekly jobnet incorporates the daily jobnet process, so you do not want to run the daily jobnet on any day scheduled for the weekly jobnet. Therefore, set the weekly jobnet as the exclusive schedule of the daily jobnet. When you set an exclusive schedule in this way, execution of the daily jobnet is canceled for any execution date that falls on the same execution date as the weekly jobnet.
The following rule applies to exclusive schedule settings.
|
Suppose that jobnet B is set as an exclusive schedule of jobnet A, and jobnet C is set as an exclusive schedule of jobnet B. In this case, jobnet C becomes an exclusive schedule of jobnet A, even though it was not explicitly set as an exclusive schedule of jobnet A.
You can specify a planning group as an exclusive schedule. For details, see 10.1.1(1)(b) Exclusive schedules for planning groups.
- Cautionary note
-
If a jobnet is registered for planned execution or for fixed execution by specifying the number of future generations, performing any of the operations below will disable schedule calculations. As a result, the jobnet might be placed in Shutdown status or the execution schedule might not be created. Cancel registration before you execute any of these operations:
-
Change the jobnet specified as an exclusive schedule in the jobnet's schedule definition.
-
Delete the jobnet specified as an exclusive schedule.
-
Rename the jobnet specified as an exclusive schedule.
-
Execute the ajsdefine command with the -i or -f option specified to update the jobnet specified as an exclusive schedule.
-
- Supplementary notes
-
-
Execution of a jobnet for which other jobnets are specified as exclusive schedules is scheduled based on the schedule definitions of the other jobnets. If the other jobnets have not been registered for execution, the exclusive schedule functionality simulates the execution of these jobnets.
-
If the execution start time type is Registered day in the schedule definition of a jobnet specified as an exclusive schedule of another jobnet, execution simulation assumes the jobnet starts on the day that the other jobnet is registered for execution. If you do not want the simulation to use this assumption, set the execution start time type of this jobnet to a type other than Registered day, and explicitly specify the execution start day.
-
If the execution schedule of a jobnet that is specified as an exclusive schedule of another jobnet is changed by Change plan, the change is applied but does not affect the schedule of the other jobnet.
-