Table of Contents |
---|
...
Directory Monitoring
Excerpt |
---|
JobScheduler can monitor file creation, file deletion, file changes and timestamp changes (aka file events) with a (standalone) job and with an order (and a job chain). |
For further information on how to use file events watching with a job chain we recommend reading Directory Monitoring with File Orders.
...
An example configuration for monitoring a file watcherdirectory:
Code Block | ||
---|---|---|
| ||
<job name = "scheduler_file_notification_1"> <script language="shell"> <![CDATA[ set echo %SCHEDULER_JOB_NAME% echo %SCHEDULER_TASK_TRIGGER_FILES% rem del %SCHEDULER_TASK_TRIGGER_FILES% ]]> </script> <start_when_directory_changed directory = "c:/temp" regex = "^file[1|2]\.xml$"/> </job> |
This job will watch monitor the folder c:/temp on a Microsoft Windows ® Windows® operating system. The regular expression is used to define which file(s) JobScheduler has to watch. In this example the regex regular expression means that every event involving the files file1.xml and/or file2.xml will fire the execution of the embedded script (which in this case will echo values for JobScheduler environment variables to stdout).
...
For further information on how to use file events watching with a job chain we recommend reading Directory Monitoring with File Orders.
See also
- Environment variable (JobScheduler Reference handbook)
- Directory Monitoring (JobScheduler Reference handbook)