Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROP_COMMAND
Required parameter that specifies the name of the command (executable)
to be ran.
|
static java.lang.String |
PROP_CONSUME_STREAMS
Optional parameter (value should be 'true' or 'false') that specifies
whether the spawned process's stdout and stderr streams should be
consumed.
|
static java.lang.String |
PROP_PARAMETERS
Optional parameter that specifies the parameters to be passed to the
executed command.
|
static java.lang.String |
PROP_WAIT_FOR_PROCESS
Optional parameter (value should be 'true' or 'false') that specifies
whether the job should wait for the execution of the native process to
complete before it completes.
|
Constructor and Description |
---|
NativeJob() |
Modifier and Type | Method and Description |
---|---|
void |
execute(JobExecutionContext context)
|
public static final java.lang.String PROP_COMMAND
public static final java.lang.String PROP_PARAMETERS
public static final java.lang.String PROP_WAIT_FOR_PROCESS
Defaults to true
.
public static final java.lang.String PROP_CONSUME_STREAMS
Defaults to false
.
public void execute(JobExecutionContext context) throws JobExecutionException
Job
Called by the
when a Scheduler
fires that is associated with the Trigger
Job
.
The implementation may wish to set a
result
object on the
JobExecutionContext
before this method exits. The result itself
is meaningless to Quartz, but may be informative to
or
JobListener
s
that are watching the job's
execution.
TriggerListener
s
execute
in interface Job
JobExecutionException
- if there is an exception while executing the job.