Directory Change

The Directory Change task monitors (keeps polling) a single directory or single file for changes.  The Directory Change task is multithreaded, and many Directory Change tasks can run simultaneously.  The Directory Change task can be used in three ways:
1) If a change is detected in this task, you can run another task and exit.
2) You can set this task to run as a daemon which continously polls the directory/file for changes, and keeps triggering another task.  This is very useful in production environments where files are continously moving into a folder.  For example, when a change is detected, you can continously launch a file processing script.  Then continue polling for changes.
3) The Directory Change task can also be embedded within a Chain task and is useful for conditional task processing. If you want to use this task in a chain for conditional processing, select 'None' as the 'Task To Run'.  If the criteria is satisfied, then an exit code = -100 is thrown.  Else, an exit code = 0 is thrown.

IMPORTANT: This task only detects changes while the task is running. So, if you start/restart the engine at 10:00 AM, and if your next DirChange task is at 10:30 AM, any directory changes between 10:00 AM - 10:30 AMwill go undetected. This task is best used on servers where you do not have to restart the engine often.

Directory
Enter the directory or file you need to monitor.

Task To Run
Select the desired task to run if any of the selected criteria are met.  If you want to use this task in a chain for conditional processing, select 'None'.  You can also select multiple tasks to run in sequence or simultaneously. To run tasks in sequence, use taskTitle1|taskTitle2|taskTitle3. To run tasks simultaneously, use taskTitle1&taskTitle2&taskTitle3.

Maximum wait time
Set the maximum allowed time to wait for a change to occur (T1).

Polling Interval
Enter the polling interval in seconds. The default value of 60 seconds is recommended.  You can choose a smaller interval if you require.

Use as Daemon
Select this option if you need to continously poll a directory for changes and trigger another task to run.  This option should not be used when running in a chain.
To monitor a directory 24 hours a day, do the following:
Set the maximum wait time (T1) for the task = 24x60 = 1440 minutes.  Schedule this task to run once a day (every 24 hours).  i.e. when the previous schedule dies a new schedule is kicked off.

Using Directory Change Task in a Chain

Difference between Directory Change and Directory Monitor Tasks
Directory Change task keeps polling the directory for the maximum time set.  When the maximum time expires or a change is detected, this task either exits or continues polling as a deamon.  Can only monitor single directory or a single file.
Directory Monitor task stores (in a log file), the modified date information for all files within the directory.  This log file is read and updated with every run. The Directory Monitor task will return as soon as it finishes reading and comparing the modified date information in the log file with the actual modified dates of the files in the directory.  Can also monitor sub directories.