There are scripts available to raise an event from a command line.

 jobscheduler_event.cmd
 jobscheduler_event.sh

These scripts are creating an order, which is then submitted to the JobScheduler. The order contains all mandatory 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.

If there is no JobScheduler installation on the host where the event has to be raised, then the script can use instead of the JobScheduler start script a perl script, which will do the communication.

The perl script is available as well in the ./bin folder of the JobScheduler installation:

 jobscheduler_client.pl

You can find these scripts in the ./bin folder of the JobScheduler installation folder.

The general syntax for these scripts are:

 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 you have to copy these scripts from a JobScheduler installation to a folder on the host where you want to raise an event.

For Windows

Modify the script jobscheduler_event.cmd to enable Perl.
Make sure that you have Perl installed and that it is in the PATH on your Windows host.

For Linux/Unix

Start the script jobscheduler_event.sh with the required parameters.

 jobscheduler_event.sh -x 0 -e class -i event_id -s hostname -r portnumber

More examples:

 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: