Hitachi

JP1 Version 12 JP1/Client Process Automation Configuration and Administration Guide


8.4.1 Monitor file event (execution condition item)

Organization of this subsection

(1) Overview of the function

This item executes jobs when file status changes.

(2) List of settings

Name

Required

Format

Can specify inherited information?

File name to be monitored

Yes

String (1 to 255 bytes)

No

Monitoring condition

Yes

Combo box (Create, Delete, Change final write time, or Change size)

No

Virtual user name

No

String (0 to 512 bytes)

No

(3) Settings

File name to be monitored

Specify the name of the file to be monitored.

Monitoring condition

Specify the monitoring conditions. The condition is met when the status of the monitored file changes to the one specified for this setting.

Virtual user name

Specify the name of the virtual user mapped to the name of the Windows user who executes the item. If the virtual user name is omitted, the item is executed with the account for the CPA job execution service.

To map the virtual user name, use the cpasetumap command. For details on the cpasetumap command, see cpasetumap in 9. Commands.

(4) Example 1

Execute the job when a certain file is created.

File name to be monitored

c:\temp\a.txt

Monitoring condition

Create

(5) Example 2

Execute the job when the last write time of one of multiple files changes.

File name to be monitored

c:\temp\*.txt

Monitoring condition

Change final write time

(6) Understanding when monitoring conditions are met

The file monitor obtains the status of the monitored file every 60 seconds, and compares the file status. When the file monitor finds a change that satisfies the monitoring conditions, it compares the status again 10 seconds later to check whether the update of the monitored file is completed. If no change is found in the monitored file at the time, then the file monitor detects the event. Thus, it can take up to 70 seconds from when the monitored file is changed until the event is detected. For deletion, it can take up to 60 seconds because the second comparison after 10 seconds is not performed.

Suppose that monitoring starts without there being any monitored file and with Change final write time or Change size specified as a monitoring condition. In this case, even when a monitored file is created, the event is detected assuming that the monitoring condition has been met.

(7) Monitoring intervals

As the file monitor checks the file status every 60 seconds, it obtains only the latest status if the monitored file has been changed multiple times within 60 seconds. For example, suppose you select Create for Monitoring condition. If a monitored file is created and immediately deleted within 60 seconds, the file monitor cannot find the file, and thus cannot detect it as an event.

(8) Files to be monitored

Files are monitored by using the account of the user who is logged on to the CPA job execution service. This means that when the default local system account is used to log on to the job execution service, only local files can be monitored (network files cannot be monitored).

(9) When specifying monitored files with wildcards

If monitoring is performed for the files specified with wildcards, only one event is raised regardless of how many files meet the condition.

If more than 10 files meet the condition, only the first 10 files are processed for event detection and other subsequent files are not processed. That is, the information of the subsequent files is not included in the inherited information. For details on inherited information, see 5.5.2 Inherited information. In addition, short file names are also monitored.

(10) Monitoring after restart

If the file monitor restarts the job execution service during monitoring, the file monitor carries over the status of the files before the service is stopped to monitor the files.

(11) If files already exist when monitoring starts

When the file monitor job starts with Monitoring condition set to Create, it detects events even if the monitored files already exist. After the job execution service is restarted, such events are no longer detected because the file monitoring job carries over the status of the files before the service is stopped.