Hitachi

JP1 Version 12 Job Management: Getting Started (Client Process Automation)


2.6 Registering a job executed on event

The example in 2.2 Creating a job runs a job immediately and the example in 2.5 Setting a schedule runs a job at a specified time. In addition to them, you can configure a job to run when a specified event occurs.

This example configures a job to monitor a file event and then copy the file when the file is created.

Specifically, when the text file c:\temp\test.txt is created, the job copies it to c:\temp\backup.txt.

Procedure

  1. In the Job Design View, click the Exec. on event tab.

    [Figure]

  2. Click the [Figure] (New) button.

    The Job exec. on event dialog box appears.

  3. Enter the job name and description.

    Example

    Job name: TEST01

    Details: File Copy

    [Figure]

  4. Under Select item, select the Action tab.

    [Figure]

  5. Select the Command execution item, and then click the Apply button.

  6. Enter the execution command, the parameter and the virtual user name.

    Example

    Execution command: cmd.exe

    Parameter: /c copy c:\temp\test.txt c:\temp\backup.txt

    Virtual user name: Virtual user name#

    #

    If you want to execute the command as a specific Windows user, specify the name of a virtual user associated with that Windows user. If this is omitted, the command is executed with the account for the CPA job execution service. For details on the virtual user name, see the manual JP1/Client Process Automation Configuration and Administration Guide.

  7. Under Select item, select the Exec. Condition tab.

    [Figure]

  8. Select the Monitor file event item.

  9. Click the Apply button.

  10. Enter the name of the file you want to monitor, the monitoring condition and virtual user name.

    Example

    File name to be monitored: c:\temp\test.txt

    Monitoring condition: Create

    Virtual user name: Virtual user name#

    #

    If you want to monitor the file as a specific Windows user, specify the name of a virtual user associated with that Windows user. If this is omitted, the command is executed with the account for the CPA job execution service. For details on the virtual user name, see the manual JP1/Client Process Automation Configuration and Administration Guide.

  11. Click the Register button.

    A message appears indicating the completion of the registration.

  12. Click the OK button.

Now the job executed on event is registered.

Create the test file c:\temp\test.txt, and then check whether the file is copied.