Using the File Watcher command

Batch Scheduler has a built-in File Watcher command you can use to check for the existance of a file. This command is performed by the Agent, on the Agent computer the command is run on.

To use the File Watcher, set up a normal Job Definition. For the Job Command, enter the following built-in command.

FILEWATCH

The Parameters used with this command are as follows:

FILENAME MINSIZE=## MAXWAIT=## DELTATIME=##

Below is a description and usage of each parameter
FILENAME
This is the name of the file you want to watch for. You must include the full path specification and the file must be accessible from the Agent computer the job runs on.

MINSIZE=##
This is the minimum file size. If the final file size is less than this value, the job will return a failed status.

MAXWAIT=##
This is the maximum amount of time to wait for the file before the job will return a failed status. This is in minutes.

DELTATIME=##
If the file does not change size within this value (in minutes), the file watch will be considered complete.

Example

Given the following FILEWATCH parameters:

c:\test.dat MINSIZE=1000 MAXWAIT=60 DELTATIME=1

The above filewatch would look for file c:\test.dat. It must be at least 1000 bytes in size, the Agent will wait up to 60 minutes for this file to appear, and it will consider the file complete if its size does not change after 1 minute.


   Index     Home