Hitachi

JP1 Version 13 JP1/Integrated Management 3 - Manager Command, Definition File and API Reference


11.2.3 Command execution (AWS Lambda linkage tool (JP1 event register command support version)

Organization of this subsection

(1) Manual execution (for Windows)

The following shows how to manually execution JP1 event-sending functionality in a Windows.

  1. Login to the executing server of the JP1 event-sending function.

  2. Start command prompt.

  3. Navigate to the sendevent_aws_lambda that you copied in 11.2.2(2)(a) JP1 Event-Send Function Arrangement.

    C:\XXX> cd ...\sendevent_aws_lambda
  4. Execute the sendevent_aws_lambda.py with Python of 11.2.1 Prerequisites (AWS Lambda linkage tool (JP1 event register command compatible version)).

    C:\XXX> python sendevent_aws_lambda.py
  5. Confirm execution of "sendevent_aws_lambda.py".

    C:\XXX> echo %ERRORLEVEL%
    0#

    #: 0 indicates Normal termination, and 0 indicates abnormal termination.

(2) Manual execution (for Linux)

The following shows how to manually execute JP1 event-sending functionality in a Linux.

  1. Login to execution server of AWS Lambda linkage tool (JP1 event register command support version).

  2. Navigate to the sendevent_aws_lambda that you copied in 11.2.2(2)(a) JP1 Event-Send Function Arrangement.

    $ cd .../sendevent_aws_lambda
  3. Execute the sendevent_aws_lambda.py with Python of 11.2.1 Prerequisites (AWS Lambda linkage tool (JP1 event register command compatible version)).

    $ python sendevent_aws_lambda.py
  4. Confirm execution of "sendevent_aws_lambda.py".

    $ echo $?
    0#

    #: 0 indicates normal termination, and 0 indicates abnormal termination.

(3) Periodic execution (for Windows)

The following shows how to periodically execute JP1 event-sending functionality in a Windows.

  1. Start the Task Scheduler and setup the sendevent_aws_lambda.py to execute periodically.

  2. Click Create Basic Task.

  3. Under Action, select Start Programming, and then setup the following values:

(4) Periodic execution (for Linux)

The following shows how to periodically execute JP1 event-sending functionality in a Linux.

  1. Login to AWS Lambda linkage execution server.

  2. Opens CRON's setup window.

    $ crontab -e
  3. Setup CRON and save it.

    In this example, we setup it to execute every 5 minutes.

    */5 * * * * #1/usr/bin/python#2 .../sendevent_aws_lambda/sendevent_aws_lambda.py#3
    #1

    Specifies execution scheduling for CRON.

    #2

    Specify the "python" in Python of 11.2.1 Prerequisites (AWS Lambda linkage tool (JP1 event register command compatible version)).

    #3

    Specify the "sendevent_aws_lambda".py under "sendevent_aws_lambda" that was copied in 11.2.2(2)(a) JP1 Event-Send Function Arrangement.