Scheduling a Job

This document covers the following topics:


Defining Scheduling Parameters for a Job

This feature allows you to define a schedule for a job master or an active job. You can define the time frame for the schedule, insert a message, assign account information and edit the schedule dependency information.

Start of instruction set To define scheduling parameters for a job

  1. For a job master:

    On the Job Maintenance screen, type S in the line command input field next to the required job.

    Or:
    For an active job:

    On the Active Jobs, All Active Jobs or Active Jobs Schedule screen, type A in the line command input field next to the required job, and press ENTER.

  2. Press ENTER.

    For a job master, a Scheduling Parameters window similar to the example below opens:

    +-------------------------------------------------------------------------+
    |                                                                         |
    |                          Scheduling Parameters                          |
    |  Job JOB-01                                                             |
    |                                                                         |
    |  Estimated Elapsed Time ==> _________ Min.    Average ==>      0.31     |
    |  History Elapsed Time   ==>      0.26      0.31      0.36      0.38     |
    |                                  0.30      0.35      0.20      0.23     |
    |                                  0.31      0.31      0.30      0.21     |
    |                                  0.25      0.38      0.40      0.38     |
    |                                  0.36      0.33      0.33      0.31     |
    |                                                                         |
    |                                                                         |
    |  Earliest Start Time    ==> 08:00:00  ___ days later, type C            |
    |  Latest Start Time      ==> 17:00:00  1__ days later, type C            |
    |  Deadline Time          ==> 20:00:00  2__ days later, type C            |
    |                                                                         |
    |  Schedule Dependency    ==> N                                           |
    |                                                                         |
    | ---PF1---PF3------------PF5----------------PF9---PF10---PF11---PF12---  |
    |    Help  End            Save               LMsg  Acct   ScDep  Menu     |
    +-------------------------------------------------------------------------+

    For an active job, an Active Scheduling Parameters window similar to the example below opens:

    +---------------------------------------------------------------------------+
    |                                                                           |
    |  Net B60-FLOW         Active Scheduling Parameters     Run Date 15.04.19  |
    |  Job JOB-01                                                 Run 3024      |
    | -----------------------------------------------------------------------   |
    |                                                                           |
    |                                                                           |
    |  Estimated Elapsed ==> _____0.00 Min.      Average Elapsed ==>      0.31  |
    |  History Elapsed   ==>      0.26      0.31      0.36      0.38      0.30  |
    |                             0.35      0.20      0.23      0.31      0.31  |
    |                             0.30      0.21      0.25      0.38      0.40  |
    |                             0.38      0.36      0.33      0.33      0.31  |
    |                                                                           |
    |  Earliest Start ==> 16.04.19 08:00:00                                     |
    |  Latest Start   ==> 17.04.19 17:00:00                                     |
    |  Deadline       ==> 18.04.19 20:00:00                                     |
    |                                                                           |
    |  Schedule Dependency ==> N                                                |
    |                                                                           |
    | ---PF1---PF3------------PF5-------------------PF9---PF10---PF11---PF12--  |
    |    Help  End            Save                  LMsg  Acct   ScDep  Menu    |
    +---------------------------------------------------------------------------+

    If scheduling parameters have already been defined, they are displayed in this window and you can modify them for the job.

    When defining a new schedule, some default values are already displayed. You can replace them as required.

    The input fields are explained in Fields: Scheduling Parameters.

  3. Choose PF5 (Save) to save the job scheduling parameters.

  4. Choose PF3 (End) to return to the Job Maintenance screen.

This section covers the following topics:

Fields: Scheduling Parameters

The fields of the Scheduling Parameters window are described in the following table.

Field Description
Estimated Elapsed Time The expected total running time (in minutes) for the job.
  • If not specified explicitly, this value is derived from the average running time of previous runs of the same job, displayed in the field directly below.

  • If this value is not equal to zero (0) for a permanent dummy job (job type DUM) with a special type other than blank or D (dummy due to a condition), this dummy job is executed for exactly the amount of time given here. This enables you to perform time simulations, etc.

  • Active scheduling parameters for a running dummy job:

    Modification of the estimated elapsed time causes the end time of the dummy job to be recalculated as sum of the start time and the new estimated elapsed time. If the new calculated end time is lower than the current time, the current time will be used instead.

  • Temporary dummy jobs with the job type DUM and special type D (dummy due to a condition) execute for the amount of time defined as estimated elapsed time for the job.

  • For temporary dummy jobs with other special types (for example, dummy due to a condition), the defined estimated elapsed time is ignored. Temporary dummy jobs always have the execution time zero.

Special value: For jobs of the job type NET, 999999 can be specified. In this case, all start times after that are set to the ending times in the subnetwork.

Average  Average running time (in minutes) computed from the last 20 runs shown in the History Elapsed Time table.
History Elapsed Time Table containing the actual running times (in minutes) of the last 20 runs of the job.

The running time of the last 20 runs with non-zero elapsed times is used to compute the average time (in the Average field) the job needs to finish.

History elapsed times for multiple jobs (see also the Suffix Symbol field described in Job Maintenance):

  • For a job master, the table contains the elapsed times of all multiple active jobs, which were last activated by this job master.

  • For an active job, the table contains the elapsed times of all multiple active jobs whose names match the name of this active job.

Earliest Start Time The job will not be started before this time.

Use days later if the Earliest Start Time is more than one day later than the network start time.

See also Date and Time Formats (section Using Entire Operations) and Processing of Time Frame Definitions.

For an active job, the Earliest Start fields contain the time calculated for the respective job run according to the definitions made in the corresponding job master. Both fields can be modified for the given job run only.

Latest Start Time  The job will not be started after this time.

If this time precedes the Earliest Start Time and days later is empty, days later is set to 1 so this time follows the Earliest Start Time.

See also Date and Time Formats (section Using Entire Operations) and Processing of Time Frame Definitions.

For an active job, the Latest Start fields contain the time calculated for the respective job run according to the definitions made in the corresponding job master. Both fields can be modified for the given job run only.

Deadline Time Time by which the job must be finished.

If the job cannot be finished before this time, it is not submitted.

Dummy jobs with Estimated Elapsed Time not equal to zero (0) are finished at this time at the latest.

See also Date and Time Formats (section Using Entire Operations) and Processing of Time Frame Definitions.

For an active job, the Deadline fields contain the time calculated for the respective job run according to the definitions made in the corresponding job master. Both fields can be modified for the given job run only.

days later (Applies to job masters only.)

You can use this field for Earliest Start Time, Latest Start Time and Deadline Time to define a time frame that exceeds 24 hours. Enter the number of days (maximum is 999) you want to postpone a start time or deadline.

See also Date and Time Formats (section Using Entire Operations) and Processing of Time Frame Definitions.

Note:
The Entire Operation default settings provide the option to define later start times in units of hours instead of integer days, for time ranges that are not a multiple of 24.

type (Applies to job masters only.)

Specifies the day type to be used for days later:

C Calendar day (default).
W Workday as defined in the calendar linked to the schedule.
Schedule Dependency A Y (Yes) here indicates that this job has a schedule dependency.

An N (No) indicates that no schedule dependency is defined for the job.

See also Maintaining Schedule Dependencies for a Job.

Cyclic Interval This field is only available for cyclic jobs.

Wait time (in minutes) between two executions of a cyclic job (special type C).

Default: Monitor wait time.

Special PF Keys: Scheduling Parameters

The following special PF keys are provided in the Scheduling Parameters window:

PF Key Name Description
PF9  LMsg  Late Message

Define users to be informed if the job was not executed in the defined time range.

See also Sending a Late Message to One or More Users.

PF10  Acct  Accounting

Display accounting information for the job.

See also Viewing Job/Network Accounting Information in the section Job Maintenance.

PF11  ScDep  Schedule dependency

Specifies days when a job is to be executed as a dummy job.

See Maintaining Schedule Dependencies for a Job.

Maintaining Schedule Dependencies for a Job

You can define particular days of the week, month or year when a job (or all jobs of a network, see Adding and Modifying a Time Frame Definition) executes as a temporary dummy due to schedule condition (see also Temporary Dummy Jobs).

You can also define day dependencies for a job input condition. If defined, the job executes without performing an input condition check.

If a day dependency is not defined (default) at the job or network level, or for a job input condition, the job executes normally, that is, exactly as defined in the job master.

The date and time defined for job execution in the Scheduling Parameters window is then checked against the current schedule of the current network, or the current calendar. For jobs in a subnetwork, we recommend you to specify that the topmost calling network is checked instead of the current network by using Schedule Usage option.

Prerequisite for Concatenated Jobs

If you want to deactivate single or multiple jobs in a chain of dependent jobs, for all jobs in the chain, the option End-of-Job Action Errors set 'not ok' Conditions must be set to N. Otherwise, errors can occur during End-of-Job processing.

See also Excluding a Job from Actual Execution.

Note:
The job execution date and time can be different (one or more days later) from the job activation date and time.

Start of instruction set To define schedule dependencies at the job level

  • Choose PF11 (ScDep) in the Scheduling Parameters window.

    A Schedule Dependency Definition for Job window similar to the example below opens:

    +---------------------------------------------------------------+
    |                                                               |
    |       Schedule Dependency Definition for Job                  |
    |                                                               |
    |  Owner   SN              Job       J001                       |
    |  Network SC-001          Condition                            |
    |                                                               |
    |  The Job will be activated only (+) / not activated (-),      |
    |  if the execution date has the following position in the      |
    |  schedule or calendar:                  Schedule Usage ==> _  |
    |                                                               |
    |        Usage ==> _  + only              - except              |
    |                     A after Holiday too B before Holiday too  |
    |         Type ==> _  H is Holiday    X is Workday              |
    |                     C Calendar Day  W Workday  S Schedule Day |
    |    in Period ==> _  W Week          M Month    Y Z Year       |
    |  at Position ==> ____                                         |
    |     or Month ==> __ Day ==> __                                |
    |  ----PF1------PF3---------PF5------------------PF9----------- |
    |      Help     End         Save                 Delete         |
    +---------------------------------------------------------------+

    The input fields contained in the window are described in Fields: Schedule Dependency Definition.

This section covers the following topics:

Defining Schedule Dependencies for an Input Condition

You can define an input condition that is not used on all activation dates of a job network. This can be done for the following reasons:

  • A predecessor job or network does not run on all schedule dates of the successor job or network.

  • Some predecessor jobs are also schedule-dependent.

Start of instruction set To define schedule dependencies for an input condition

  1. On the Input Conditions Maintenance screen of a selected job, type S in the line command input field of the selected condition.

  2. Press ENTER.

    A Schedule Dependency Definition for Input Condition window similar to the example below opens:

    +---------------------------------------------------------------+
    |                                                               |
    |       Schedule Dependency Definition for Input Condition      |
    |                                                               |
    |  Owner   EXAMPLE         Job       JOB-01                     |
    |  Network B60-FLOW        Condition USEREXIT1                  |
    |                                                               |
    |  The Condition is to be checked only (+) / except (-),        |
    |  if the execution date has the following position in the      |
    |  schedule or calendar:                  Schedule Usage ==> _  |
    |                                                               |
    |        Usage ==> _  + only              - except              |
    |                     A after Holiday too B before Holiday too  |
    |         Type ==> _  H is Holiday    X is Workday              |
    |                     C Calendar Day  W Workday  S Schedule Day |
    |    in Period ==> _  W Week          M Month    Y Z Year       |
    |  at Position ==> ____                                         |
    |     or Month ==> __ Day ==> __                                |
    |  ----PF1------PF3---------PF5------------------PF9----------- |
    |      Help     End         Save                 Delete         |
    +---------------------------------------------------------------+

    The fields contained in the window correspond to the fields of the Schedule Dependency Definition for Job window. They are explained in Fields: Schedule Dependency Definition.

  3. Make your definitions and choose PF5 to save your entries.

    The schedule dependency is allocated to the input condition.

  4. Choose PF3 to return to the Input Conditions Maintenance screen.

    The schedule dependency is indicated in the Sched.Dep. column.

Fields: Schedule Dependency Definition

The input fields of the Schedule Dependency Definition window provided for a job, a job input condition and a network are described in the following table:

Field Description
Schedule Usage Possible input values:
blank Checks the schedule of the current network (default).

This setting is recommended for jobs in main networks.

T Checks the schedule of the topmost network that calls the job.

This setting is recommended for jobs in subnetworks.

Usage

(only or except)

         
Possible input values:
+  For a job or condition:

The job or condition is activated only if the execution date satisfies the criteria entered in the Type, in Period and at Position fields.

For a network:

The object is valid only for schedule days matching the following definitions.

A Like +, but the first workday after an otherwise matching holiday is valid, too.
B  Like +, but the last workday before an otherwise matching holiday is valid, too.
-  For a job or condition:

The job or condition is activated except when the execution date satisfies the criteria entered in the Type, in Period and at Position fields.

For a network:

The object is valid for all schedule days except if they match the following definitions.

Type            Possible input values:
H  Any holiday (no period and/or position required).

The relative position to the holiday can be specified.

X Any workday (no period and/or position required).

The relative position to the workday can be specified.

C  Calendar day within the defined period.

A relative position refers to the real calendar period.

W  Workday within the defined period.

A relative position refers to the workdays in the period.

S  Schedule day within the defined period.

A relative position refers to the schedule days in the period.

in Period       Possible input values:
W  Current week.
M  Current month. 
Y  Current year, with relative position.
Z Current year, with explicit month and day (no position required).

Only applies if C is specified as the type.

at Position Schedule dependency position.

The position within the defined period depending on the specified type.

(Not required for type C if combined with period Z.)

  • Positive values (+) are relative to the period begin, negative values (-) are relative to the period end. For the types H and X, this is the day difference.

    Valid value ranges are:

    For a week: -7 to -1 and +1 to +7
    For a month: -31 to -1 and +1 to +31
    For a year: -366 to -1 and +1 to +366

    A value of zero (0) or no value is only accepted (and ignored) if not required for the specified type.

    Note:
    You can specify up to three days for the period week. Example: 24 is Tuesday and Thursday.

See also Examples of Schedule Dependency Definitions.

or Month (Only applies with period Z and Day.)

Fixed month (1 - 12) of the year.

Day (Only applies with period Z and or Month.)

Fixed day (1 - 31) of the specified month.

Examples of Schedule Dependency Definitions

The following are example combinations for day calculation:

Type Period Position or Month/Day Calculated Day
C W +2 Tuesday
-1 Sunday
M +1 01
-1 28 ... 31
Y +1 January 01
-3 December 29
Z Month: 4, Day: 9 April 09

(yearly, including leap years)

W M -1 Last workday of the month
234 Second, third and fourth workday of the month
H n/a +1 Day after a holiday
Special PF Keys: Schedule Dependency Definition for Job

The following special PF key is provided in the Schedule Dependency Definition for Job window:

PF Key Name Function
PF9  Delete   Delete entries in the fields Usage, Type, in Period and at Position. See also Deleting Dependency Entries.

Deleting Schedule Dependency Entries

Start of instruction setTo delete a schedule dependency entry for a job

  1. In the Schedule Dependency Definition for Job window, choose PF9 (Delete).

    The following window opens:

     16-07-07                ***** Entire Operations *****                13:51:11 
     Job Maintenance         Owner SAGTEST    Network B60-FLOW   Version           
      +-------------------------------------------------------------------------+ -
      !         +---------------------------------------------------------------+  
      !         !                                                               !  
      !  Job JO !       Schedule Dependency Definition for Job                  !  
      !         !                                                               !  
      !  Estima !  Owner   SAGTEST         Job       JOB-1-TEST                 !  
      !  Histor !  Network B60-FLOW        Condition                            !  
      !       +-------------------------------------------------------------+   !  
      !       !                                                             !   !  
      !       !  Please confirm                                             !   !  
      !  Earl !  the Deletion of DEPENDENCY                                 !   !  
      !  Late !  by entering 'Y' ===> _                                     !   !  
      !  Dead !                                                             !   !  
      !       !  PF3 End                                                    !   !  
      !  Sche +-------------------------------------------------------------+   ! 1
      !         !                     C Calendar Day  W Workday  S Schedule Day ! *
      ! ---PF1- !    in Period ==> _  W Week          M Month    Y Year         !  
      !    Help !  at Position ==> ______                                       !  
      +-------- !  ----PF1------PF3---------PF5------------------PF9----------- !  
                !      Help     End         Save                 Delete         !  
                +---------------------------------------------------------------+  
                                                                                   
                                                                                   
    Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
          Help  Add   End         Save        Up    Down                    Menu
  2. Enter Y (Yes) and press ENTER to delete all field entries.

  3. Choose PF3 (End) to close the window.

Sending a Late Message to One or More Users

You can define one or more users (recipients) to receive job-related standard messages that are sent when a job could not be executed in the defined time range.

Start of instruction set To inform users that a job could not be executed

Note:
You cannot change the text of job-related standard messages.