Top
Systemwalker Operation Manager  Reference Guide
FUJITSU Software

4.20 jobschchecktime Command

Synopsis

jobschchecktime -wt waittime [-lt maxwaittime] [-sys subsystem-number](*1)
*1:

[-sys subsystem-number] is the option of Systemwalker Operation Manager EE.

Description

The jobschchecktime command waits until the wait time specified by the option comes. If the wait time has already passed, this command (job) stops immediately. If the maximum wait time is specified by the option, a return value varies depending on whether the job was executed before or after the maximum wait time.

Wait times and maximum wait times are based on day change times. Network jobs use the day change time on the execution server.

This command cannot be used when the server is not running.

Option

-wt waittime

This option is used to specify the wait time by setting the hour and minute in two digits each between 0000 and 2359. Also consider the day change time, for example, if the day change time is set to 10 o'clock, the value 0900 represents 9:00 of the next day.

-It maxwaittime

This option is used to specify the maximum wait time by setting the hour and minute in two digits each between 0000 and 2359. Also consider the day change time, for example, if the day change time is 10 o'clock and the value 0930 represents 9:30 of the next day. If the maxwaittime is earlier than the waittime, it fails.

Enterprise Edition-sys subsystem-number

In the system with multiple subsystems, this option is used to specify the subsystem that you want to operate. Specify the target subsystem number using a range of 0 to 9. If omitted, the default is subsystem 0.

Wait times (-wt) based on day change times and command start times

Wait times (-wt) are based on day change times.

Day change times and wait times specified with -wt, as well as the results of starting the jobschchecktime command, have their relationships shown in the following diagram:

If the time when the jobschchecktime command starts is after the wait time specified by the -wt option, the command will end immediately. Also, if the time when the jobschchecktime command starts is before the wait time specified by the -wt option, the command will not be executed until the wait time.

So if the day change time is 5 o'clock, and the command start time is 3 o'clock, the behavior will be as follows.

  1. If the wait time is 6 o'clock (-wt 0600)

    The wait time has already passed, so the command will end immediately.

  2. If the wait time is 1 o'clock (-wt 0100)

    The wait time has already passed, so the command will end immediately.

  3. If the wait time is 4 o'clock (-wt 0400)

    It waits until 4 o'clock.

Wait times (-wt) and maximum wait times (-lt)

The following figure shows the relationship between the wait time specified by the -wt option and the maximum wait time specified by the -lt option:

If the time when the jobschchecktime command starts is before the wait time specified by the -wt option, the command will not be executed until the wait time.

If the time when the jobschchecktime command starts is after the wait time specified by the "-wt" option but before the maximum wait time specified by the "-lt" option, the command will be executed immediately.

If the time when the jobschchecktime command starts is after the maximum wait time specified by the "-lt" option, the command will terminate abnormally with a return value of 1.


The maximum wait time (specified by the "-lt" option) can be used as follows:

As can be seen from the diagram above, JOB3 needs to start sometime between 12:00 and 15:00. If the preceding job, JOB1, starts at 9:00 but takes several hours to complete, then a jobschchecktime command specifying the maximum wait time can be specified as JOB2 between JOB1 and JOB3.

If JOB1 finishes before 12:00, the command for JOB2 will not be executed until 12:00, so JOB3 will not start before 12:00. If JOB1 finishes between 12:00 and 15:00, the command for JOB2 will be immediately executed and terminated, so that JOB3 starts between 12:00 and 15:00. If JOB1 does not finish until after 15:00, then JOB2 will terminate abnormally and so JOB3 will not execute. This makes it possible to ensure that JOB3 will only ever start between 12:00 and 15:00.

Specifying wait times (-wt), maximum wait times (-lt) and day change times

Specify day change times, wait times (-wt), and maximum wait times (-lt) as shown in the following diagram:

Values between 0000 and 2359 can be specified for -wt and -lt, but use the day change time as the basis for these specifications. Specify the wait time (the "-wt" option) to be before the maximum wait time (the "-lt" option), within the range determined by the day change time.

For example, if the day change time is 5:00 and "-wt 1700 -lt 0400" is specified, then 0400 will mean 4:00 the next day. If the "-lt" time comes first, as in "-wt 1700 -lt 1500", the command will produce an error and the job will terminate abnormally.

Return Values

0:

Indicates that any of the following has occurred.

  • Started before the wait time and has waited until the wait time.

  • Started after the wait time and the maximum wait time has not been specified.

  • Started between the wait time and the maximum wait time.

1:

Indicates that a job has started after the maximum wait time.

21:

Indicates that there is an error in specification of options. If invalid option, incorrect values or improper combination of options are specified, this value is returned.

22:

Indicates that an error related to the system or the user environment occurred.

31:

Indicates that a Systemwalker Operation Manager environment related internal error occurred.

35:

Indicates other internal error occurred.

Command Location

Windows

Systemwalker Operation Manager installation directory\MpWalker.JM\bin

Solaris
Linux

/opt/FJSVJOBSC/bin

HP-UX

/opt/FHPJOBSCH/bin

AIX

/usr/FAIXJOBSC/bin

Example

To make the command wait until 10:00 and start no later than 11:00:

jobschchecktime -wt 1000 -lt 1100

Execution Result/Output Format

CT_WTIME=1000
CT_LTIME=1100