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.
-
Login to the executing server of the JP1 event-sending function.
-
Start command prompt.
-
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
-
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
-
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.
-
Login to execution server of AWS Lambda linkage tool (JP1 event register command support version).
-
Navigate to the sendevent_aws_lambda that you copied in 11.2.2(2)(a) JP1 Event-Send Function Arrangement.
$ cd .../sendevent_aws_lambda
-
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
-
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.
-
Start the Task Scheduler and setup the sendevent_aws_lambda.py to execute periodically.
-
Click Create Basic Task.
-
Under Action, select Start Programming, and then setup the following values:
-
Program/script: "python.exe" in Python of 11.2.1 Prerequisites (AWS Lambda linkage tool (JP1 event register command compatible version)) is specified.
-
Argument addition (optional): Specify "sendevent_aws_lambda".py.
-
Start (optional): Specify the "sendevent_aws_lambda" that was copied in 11.2.2(2)(a) JP1 Event-Send Function Arrangement of JP1 event-sending function."
-
(4) Periodic execution (for Linux)
The following shows how to periodically execute JP1 event-sending functionality in a Linux.
-
Login to AWS Lambda linkage execution server.
-
Opens CRON's setup window.
$ crontab -e
-
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.