Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.quartz.jobs
Class NativeJob

    java.lang.Object
      org.quartz.jobs.NativeJob

All Implemented Interfaces:
  Job

public class NativeJob
extends Object
implements Job

Field Summary
`static String` | `PROP_COMMAND` Required parameter that specifies the name of the command (executable) to be ran.
`static 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 String` | `PROP_PARAMETERS` Optional parameter that specifies the parameters to be passed to the executed command.
`static 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 Summary
`NativeJob()`

Method Summary
`void` | `execute(JobExecutionContext context)` Called by the ``Scheduler`` when a ``Trigger`` fires that is associated with the `Job`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### PROP_COMMAND

    public static final String PROP_COMMAND

  Required parameter that specifies the name of the command (executable) to be ran.

  See Also:
    Constant Field Values

### PROP_PARAMETERS

    public static final String PROP_PARAMETERS

  Optional parameter that specifies the parameters to be passed to the executed command.

  See Also:
    Constant Field Values

### PROP_WAIT_FOR_PROCESS

    public static final 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.

  Defaults to `true`.

  See Also:
    Constant Field Values

### PROP_CONSUME_STREAMS

    public static final 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. If the process creates output, it is possible that it might 'hang' if the streams are not consumed.

  Defaults to `false`.

  See Also:
    Constant Field Values

Constructor Detail

### NativeJob

    public NativeJob()

Method Detail

### execute

    public void execute(JobExecutionContext context)
                 throws JobExecutionException

  Description copied from interface: `Job`

  Called by the ``Scheduler`` when a ``Trigger`` fires that is associated with the `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 ``JobListener`s` or ``TriggerListener`s` that are watching the job's execution.

  Specified by:
    `execute` in interface `Job`
  Returns:
    void (nothing) if job is successful.
  Throws:
    `JobExecutionException` - if there is an exception while executing the job.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Quartz Enterprise Job Scheduler Project Page
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD