Advanced Page

Show Window Sample

The Advanced page defines additional options for the task

Limit execution to __ seconds

When this option is checked, adTempus will terminate the process if it is still running after the specified number of seconds.

This option should generally be used only as a last resort to terminate an application that is not behaving properly. adTempus cannot always terminate the process cleanly, and this can lead to problems (such as data corruption) with your application. See How adTempus Terminates a Process for more information.

 

If the task being executed is a batch file rather than an executable process, terminating it terminates only the batch file. This does not terminate any program(s) started by the batch file.

Before the process is terminated adTempus fires the "Before process is killed" event. You can attach a Response to this event and use it to try to close the application gracefully. For example, you could use a script action to send the keystrokes necessary to close whatever document is open.

If you are looking for a way to close an application at a certain time, see the How to Tell an Application to Close topic for suggestions.

Startup Determination

The Startup Determination option can be used to allow an application to finish initializing before job execution continues. This option is useful when a subsequent action or step needs to interact with the program. For example, if you are launching a program and then in a subsequent step sending keystrokes to the program, you must wait until the program has initialized and begun accepting keystrokes. Three options are available:

Success Criteria

The Success Criteria determine whether the step is reported as Successful or Failed. Four options are available:

Many—but not all—programs return an exit code to indicate their status. By convention, an exit code of 0 indicates success; an exit code greater than 0 indicates failure.

Note that the meaning of a particular exit code is dependent on the program being run. adTempus does not know what if anything an exit code means—it can only detect and respond to the exit code.

For more information see the Exit Codes topic.

Before it returns your script must set the global Result variable to either True (step succeeded) or False (step failed). Any other value will cause the step to be reported as Failed.

This feature can be used, for example, when you are running a program that does not produce a meaningful exit code, but produces a file if it succeeds. You could use a script to check for the existence of the file and set the step's status accordingly.

You can also test for any number of specific exit codes and take action based on them using Responses for the step. For example, you may want to report the step as failed if the exit code is greater than 0, but send e-mail notification to an administrator if the exit code is greater than 128.

 

 

Program Execution Task Properties

Program Execution Task Overview

Script Overview

Returning Results from Scripts