McIDAS User's Guide
Version 2019.1

[Search Manual] [Table of Contents] [Go to Previous] [Go to Next]


TIMEOUT

Runs a McIDAS command, stopping it after a waiting period.


Format

TIMEOUT nseconds command


Parameters

nseconds

maximum number of seconds that the command is allowed to run before it's stopped (no default)

command

complete McIDAS command to run, including parameters and keywords; see the Remarks


Remarks

TIMEOUT runs the specified McIDAS command and stops it if it hasn't completed within the specified waiting period. Use TIMEOUT when obtaining data from a remote server and the communications is slow or unreliable. For example, if you schedule multiple IMGDISP commands to run while the workstation is unattended, you can use the TIMEOUT command to avoid a large number of hung IMGDISP processes if communications problems arise.

If you use TIMEOUT to run a script, macro, BATCH file, or McBASI program that runs multiple McIDAS commands, the TIMEOUT waiting period begins with the first command and does NOT restart with each subsequent command. If you want to control the waiting period for each command, include each one in a separate TIMEOUT command. For example, if you run the following BATCH command:

BATCH CONTINUE=YES "IMGCOPY.BAT

and IMGCOPY.BAT consists of the commands below, the three IMGCOPY commands are run in order, each with a waiting period of 180 seconds.

TIMEOUT 180 IMGCOPY GOES/VISIBLE.0 MYDATA/VIS.1

TIMEOUT 180 IMGCOPY GOES/INFRARED.0 MYDATA/IR.1

TIMEOUT 180 IMGCOPY GOES/WATERVAPOR.0 MYDATA/WV.1

The CONTINUE=YES keyword is used so that each IMGCOPY command is run even if the previous command times out or stops abnormally.


Examples

TIMEOUT 90 IMGDISP GVAR/CONUSV STA=KCLE ALL=1 4

This entry runs the IMGDISP command, allowing 90 seconds for it to complete. If IMGDISP takes longer than 90 seconds, it is stopped by the TIMEOUT command.

TIMEOUT 300 RUN FILE=GETDATA.MCB

This entry runs the McBASI program GETDATA.MCB, allowing 300 seconds for it to complete. If it doesn't complete within 300 seconds, the program is stopped at the command that is running.


[Search Manual] [Table of Contents] [Go to Previous] [Go to Next]