The Watcher impeller is used to enqueue a job for execution when a file meeting specific criteria appears in a folder monitored by the pasUnity Watcher Service.


This impeller extends basic impeller functionality.  For details common to all job impellers click here.


In addition to the common attributes shared by all impellers this impeller type has the following attributes:

Detection Events: The file system events that can be used to queue jobs.  The events are as follow:

Created: A file has been created. For most users launching jobs based on the Create event will be sufficient.  If files that meet your filter criteria appear in monitored folders but do not cause the impeller to queue work the cause may be because they were created with a temporary file name and instantly renamed.  In this case track the Renamed event instead of or in addition to the Create event.

Changed: A file has had either the last modified date or its contents edited.  In some situations, created and renamed files can cause the impeller to queue work.  This event can sometimes be seen to fire several times in rapid succession as a result of applications that write data in chunks or anti-virus software.  Use caution when monitoring this event.

Deleted: A file has been deleted from the file system.  This can be used to enqueue jobs but obviously the file will have already been deleted so ensure that you do not attempt to manipulate the file within your jobs as it no longer exists.

Renamed: A file has been renamed.  When the impeller captures this event the new name of the file will be used to queue work and apply filters.  In some situations, the impeller will match both the old and new name against filter criteria.

Folder: The folder on the machine where the agent is executing that is to be monitored for changes.  The folder must exist.

Include Subfolders: When this option is checked subfolders of the target folder are included for monitoring

Ignore Zero-Length Files: When this option is checked only files that have a size other than 0 can trigger the impeller.  This option has no effect during a Deleted detection event.

File Name Filter: The pattern that files must meet in order to enqueue jobs.  The default search mode is to use operating system wildcard filters but an override exists for users who wish to specify more advanced criteria using regular expressions.  Wildcard filters are only case sensitive if the underlying file system is also case sensitive which is not the case on a default installation of NTFS.  The * character represents any number of characters.  Example *.XML or X*.DAT.  Regular expression searches will be case insensitive.  For detailed information on wildcards see the Wildcards topic.

Use Regular Expressions: Indicates a preference to use regular expressions instead of wildcard searches in the Filter.

File Contents Pattern: A Regular Expression which is used to search the contents of a text file in addition to only the name of a file.  Depending on file size this option can drastically affect performance and is not recommended for use.  This option will be ineffective with binary and proprietary file formats.  Search will be case-sensitive.  This option has no effect during a Deleted detection event.

Auto Recover Watcher: Occasionally the watcher may become unbound when watching UNC folders hosted on another host.  This is most often associated with the remote host being restarted.  Checking this setting will cause the monitored folder to be reinitialized on a periodic basis to ensure that the monitoring remains intact.

Buffer Factor: A value between 1 and 64 that signifies the number of kilobytes uses to store file system events in memory.  Each event uses a minimum of 16 bytes of memory.  In situations where the server may encounter a significant number of file system changes in a very short period of time the buffer may be overrun.  When monitoring network shares it is imperative that you not exceed a value of 8 as there are documented issues with buffers in excess of 8K.  It is perfectly acceptable to use a value up to 64 when monitoring the file system on the local machine where the pasUnity Watcher Agent service is installed

Execution Delay: An amount of time to make the system wait before processing the file for the first time.  This can be useful if the watcher is triggered by an IO event (such as writing to the file) that may take several moments or is performed in chunks in which a premature start of any jobs that process the file would fail because the file is in use.

After making changes be sure to press the Update button to save your changes.

NOTE: Changes will take effect after you restart the pasUnity Watcher Agent service or at the next settings refresh interval.


Copyright © 2024 pasUNITY, Inc.


Send comments on this topic.