Creating file monitor tasks using Orchestration CLI
You can create a file monitor task by adding the specific attributes related to file monitor with the mandatory task definition attributes.
Syntax and attributes
Before creating the job definition, you must ensure that the HCL UnO agent is installed in your computer. For more information, see Installing HCL UnO agent.
The mandatory and optional attributes to create a file monitor task are as
follows:
---
kind: JobDefinition
def:
workstation:
folder:
name:
type: filemonitor
task:
filemonitor:
Action:
queryInfo:
event: [create | modify | delete]
filePath:
minFileSize:
timeOut:
modificationCompletedTime:
outputFile:
pollingType:
[periodic | eventdriven]:
username:
polling:
password:
batch:
recovery:
action: STOP
repeatInterval: PT0S
repeatAffinity: false
You can configure the definition to create specific tasks. For more information about mandatory and optional file monitor attributes, see Creating file monitor tasks using Orchestration CLI.
Examples
- To monitor the
abc.txtfile available in multiple folders every 20 seconds for 3 minutes, define the task definition as follows:--- kind: JobDefinition def: workstation: /MY_AGENT1 folder: / name: JOB23 type: filemonitor task: filemonitor: Action: queryInfo: event: modify filePath: C:\CodeRepo\fol*\abc.txt timeOut: 180 pollingType: periodic: polling: 20 recovery: action: STOP repeatInterval: PT0S repeatAffinity: false - To monitor the
alram.txtfile until a change occurs within 4 minutes, define the definition as follows:--- kind: JobDefinition def: workstation: /MY_AGENT1 folder: / name: type: filemonitor task: filemonitor: Action: queryInfo: event: modify filePath: C:\CodeRepo\folder1\alarm.txt minFileSize: timeOut: "240" pollingType: eventdriven:"" recovery: action: STOP repeatInterval: PT0S repeatAffinity: false