Skip to content

Provides a job execution framework with Bootique integration

License

Notifications You must be signed in to change notification settings

FinamTrade/bootique-job

 
 

Repository files navigation

Build Status Maven Central

bootique-job

Provides a job execution framework with Bootique integration. The framework includes a basic runnable job definition with metadata and parameters, a job scheduler. It contains Bootique commands to list jobs, run individual jobs, and schedule periodic job execution. Also includes a Zookeeper-based cluster locking facility for jobs that should not be allowed to run concurrently.

See usage example bootique-jobs-demo.

Commands

ListCommand

--list

List all configured jobs and their parameters and default parameter values.

ExecCommand

--exec --job=name [--job=name [...]] [--serial]

Executes one or more jobs, possibly in parallel. The options have the following meaning:

  • --job=name: name is either a job name or a job group name. Multiple --job arguments can be specified in order to run several jobs with a single command.
  • --serial: enforces sequential execution of jobs, in the same order that they are specified in the program arguments. Does not have any effect, if only one --job argument has been specified.

This command implements a fail-fast behavior, when run in serial mode. If there is more than one --job argument, and one of the jobs fails, the command terminates immediately, and the subsequent jobs are not executed.

This command returns exit code 0, only if all of the jobs complete normally. I.e. it always returns a non-zero exit code, if at least one of the jobs fails, regardless of the mode of execution (parallel or serial).

ScheduleCommand

--schedule

Schedules and executes jobs according to configuration. Waits indefinitely on the foreground.

About

Provides a job execution framework with Bootique integration

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%