HCL Workload Automation, Version 9.4

maxdur

Specifies the maximum length of time a job can run. You can express this time in either minutes, or as a percentage of the latest estimated duration for the job. If a job is running, and the maximum duration time has been exceeded, then the following actions occur:
  • One of the following actions is triggered: Kill or Continue.
  • The job is shown as exceeded in the following places:
    • When running showjob from the conman command line, MaxDurationExceeded is displayed.
    • From the Dynamic Workload Console in the job properties for the job.
    • An informational message is written to the TWS_home/stdlist/logs/yyyymmdd_TWSMERGE.log file.

If this job is still running when JnextPlan is run, then the job is inserted in the USERJOBS job stream. The maximum duration setting is not maintained for the job in the USERJOBS job stream and will not be monitored. To have the job stream carried forward and avoid having the job being moved to the USERJOBS job stream, flag the original job stream where the maximum duration setting was specified as a carryforward job stream (setting the carryforward keyword in the job stream) if the enCarryForward global option is set to yes, otherwise, set the enCarryForward global option to all.

Syntax

maxdur time | percentage % onmaxdur action

Arguments

time
Specifies a length of time expressed using the syntax HHHMM where,
HHH
Represents the number of hours and is a number ranging from 000-500.
MM
Represents the number of minutes and is a number ranging from 00-59.
percentage
Specifies the percentage of the latest estimated duration. It can be a number ranging from 0-1000000.
onmaxdur action
Specifies the action to be triggered on a job that is still running when the maximum duration specified for this job has been exceeded. The following are the possible values of the action parameter:
Kill
Specify to stop the running job. Killed jobs end in the ABEND state. Any jobs or job streams that are dependent on a killed job are not released. Killed jobs can be rerun.
Continue
Specifies to let the running job continue to run even if it has exceeded the maximum time duration.
When submitting a conman command to set or change the onmaxdur action, you must also specify the maxdur keyword in connection with the onmaxdur argument.

Examples

The following example specifies to continue a running job if it is still running after one hour and 20 minutes:
MAXDUR 0120 ONMAXDUR CONT
The following example specifies to kill a running job when if the job runs longer than one hour and 20 minutes:
MAXDUR 0120 ONMAXDUR KILL
The following example specifies to continue a running job if the job is still running after it has exceeded 120% of its maximum duration where the maximum duration is based on the latest estimated duration:
MAXDUR 120 % ONMAXDUR KILL