File System Triggers
File system triggers start jobs when a change is detected in a file or folder (e.g., a new file has been added). Note that deleted files cannot be monitored. You can configure the directory polling interval (e.g., every 60 seconds) and optionally set the start and expiry date of the trigger. You can also use wildcards to filter specific files of the directory. The screenshot below illustrates a sample file system trigger.
The subsection below explains how to define the settings of file system triggers.
File system trigger overview
File system triggers have the following parameters: Check, Of file or directory, Polling interval, Wait N seconds for settle, Start, Expires, Time zone, and Enabled (see descriptions below).
Specifies how the trigger should poll the directory or file. Valid options are listed below:
•Newly created: The trigger fires whenever any new files or directories are added to the specified directory. In terms of server load, this option requires the least server resources. When a new trigger is added and the job is saved, any existing files in that directory will be considered as newly created, and the job will be executed for each. If a file is deleted and then added again later, the job will be executed for it again. Note that this will happen only if the polling interval has already elapsed since the deletion. The trigger also fires if a file has been renamed. This trigger does not fire if any files from the polled directory are subsequently modified. If you need such behavior, see Modified Date below.
•Modified Date: The trigger checks the last modification timestamp of all the specified files. If any dates have changed or a new file has been added or renamed, the trigger fires. This option takes slightly more resources from the server than the previous one.
•Content: This option computes and stores a hash code for the specified file. After the polling interval has passed, the hash code is recomputed and compared to the stored value. If there is a difference, the trigger fires. Note that this can place considerable load on the server. If any dates have changed or a new file has been added or renamed, the trigger also fires.
|
You can choose any path, in which you would like to check changes. You can also use wildcards to specify directories for a file system trigger. For example, you can specify the following path: C:\inbound\A*\B*. FlowForce will scan all the subdirectories of C:\inbound: It will first scan its child directories starting with A and then scan all the child directories of A for directories/files starting with B.
|
Specifies the frequency (in seconds), with which the directory will be polled. The default value is 60 seconds. The minimum value is 1 second.
|
The server will wait N seconds before checking the file. If the file is still in the specified location and has not changed during the settle period, the job will start. Otherwise, the server will wait again for the specified period and then check again if the file has changed since the last check. This option allows FlowForce Server to wait until the file has been fully written and ensure that the file is not being edited/changed by anybody.
|
Defines the trigger's starting date and time. This is an optional field. When you click in the date field, a pop-up calendar opens, which allows you to select the start date. You can also type in the date manually.
|
Defines the date and time when the trigger expires.
|
Defines the time zone of the start and expiry date and time. The default time zone is defined in the server administration settings.
|
The Enabled check box allows you to enable or disable the trigger. This option can be useful when you create and test new jobs.
|