Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
src Updating project to latest release version of task Jul 15, 2016
README.adoc Add missing references to app READMEs Aug 29, 2016
pom.xml Update version to 1.1.0.BUILD-SNAPSHOT Oct 7, 2016

README.adoc

TriggerTask Source

The TriggerTask app sends a TaskLaunchRequest based on a fixed delay, date or cron expression. The user is allowed to set the command line arguments as well as the Spring Boot properties that are used by the task.

Options

The triggertask source has the following options:

trigger.cron

Cron expression value for the Cron Trigger. (String, default: <none>)

trigger.date-format

Format for the date value. (String, default: <none>)

trigger.fixed-delay

Fixed delay for periodic triggers. (Integer, default: 1)

trigger.initial-delay

Initial delay for periodic triggers. (Integer, default: 0)

trigger.max-messages

Maximum messages per poll, -1 means infinity. (Long, default: 1)

trigger.source.payload

The expression for the payload of the Source module. (Expression, default: <none>)

trigger.time-unit

The TimeUnit to apply to delay values. (TimeUnit, default: <none>, possible values: NANOSECONDS,MICROSECONDS,MILLISECONDS,SECONDS,MINUTES,HOURS,DAYS)

triggertask.command-line-args

Space delimited key=value pairs to be used as commandline variables for the task. (String, default: <empty string>)

triggertask.deployment-properties

Comma delimited key=value pairs to be used as deploymentProperties for the task. (String, default: <empty string>)

triggertask.environment-properties

Comma delimited key=value pairs to be used as environmentProperties for the task. (String, default: <empty string>)

triggertask.uri

The uri to the task artifact. (String, default: <empty string>)

Using the triggertask

A trigger task is a source that dispatches TaskLaunchRequest messages that will eventually be consumed by a tasklauncher-* sink. The tasklauncher-* sink will then deploy a task and launch it. An example of this using Spring Cloud Data Flow would look like this:

stream create foo --definition "triggertask --uri=maven://org.springframework.cloud.task.app:timestamp-task:jar:1.0.0.BUILD-SNAPSHOT --fixed-delay=5 | tasklauncher-local"

In the case above the tasklauncher-local will receive the TaskLaunchRequest and launch the task enumerated in the --uri property using the Spring Cloud Local Deployer.

The only required property for the triggertask is the --uri which specifies the artifact that will be launched by the tasklauncher-* that you have selected.

Build

$ mvn clean package