Table of Contents | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
There are scripts available to raise an event from a command line.
Code Block |
---|
jobscheduler_event.cmd
jobscheduler_event.sh
|
These scripts are creating an order, which is then submitted to the JobScheduler. The order contains all mandatory informations information for the event.
By default, the scripts are using the JobScheduler start script to communicate with the JobScheduler. This works, if a JobScheduler installation is available and the ./bin folder of the JobScheduler is in the path variable.
...
The perl script is available as well in the ./bin folder of the JobScheduler installation:
Code Block |
---|
jobscheduler_client.pl
|
You can find these scripts in the ./bin folder of the JobScheduler installation folder.
The general syntax for these scripts are:
Code Block | ||
---|---|---|
| ||
jobscheduler_event.cmd
-x exit-code
-e event-class
-i event-id, default: exit code
[-j job-name, default: %SCHEDULER_JOB_NAME% ]
[-c job-chain, default: %SCHEDULER_JOB_CHAIN% ]
[-o order-id, default: %SCHEDULER_ORDER_ID% ]
[-h workload-job-scheduler-host, default: %SCHEDULER_HOST% ]
[-p workload-job-scheduler-port, default: %SCHEDULER_TCP_PORT% ]
[-s supervisor-job-scheduler-host, default: %SCHEDULER_SUPERVISOR_HOST% ]
[-r supervisor-job-scheduler-port, default: %SCHEDULER_SUPERVISOR_PORT% ]
[-w add|remove|check, default: add ]
[-t never|expiration-date (ISO) ]
[-tc expiration-cycle (hh:mm[:ss]) ]
[-tp expiration-period (hh:mm[:ss]) ]
[-a XPath expression, for -w=check ]
[-d name=value] ...
[allowed-exit-code] ...
|
To use the .cmd or .sh script with perl Perl you have to copy these scripts from a JobScheduler installation to a folder on the host where you want to raise an event.
on For Windows:
Modify the script jobscheduler_event.cmd to enable perlPerl.
Make sure that you have perl Perl installed and that it is in the path PATH on your windows Windows host.
on For Linux/Unix:
Start the script jobscheduler_event.sh with the required parameters.
Code Block | ||
---|---|---|
| ||
jobscheduler_event.sh -x 0 -e class -i event_id -s hostname -r portnumber
|
More examples:
Code Block | ||
---|---|---|
| ||
test@homer:~/tmp/event> ./jobscheduler_event.sh -h homer -p 4312 -e test-class
Job Scheduler response:
ok
test@homer:~/tmp/event> ./jobscheduler_event.sh -h homer -p 4312 -e test-class -w check
1
test@homer:~/tmp/event> ./jobscheduler_event.sh -h homer -p 4312 -e test-class -w remove
Job Scheduler response:
ok
test@homer:~/tmp/event> ./jobscheduler_event.sh -h homer -p 4312 -e test-class -w check
0
|
See also:
- [JobScheduler Events Referencescheduler_events.pdf]
- The
...
- Perl package IO::Socket is required to execute the
...
- Perl script.