Figure 2. New Scheduled Task Configuration Panel
Scheduled Tasks | |
Field Name | Description |
Task Name | Name of the scheduled task |
Task Group | The Group name to grouping tasks. The group name synapse.simple.quartz groups the tasks belongs to ESB - Synapse. All available groups are displayed as a drop down menu.If there are tasks belong to some other domains - for example WSO2 Mashups tasks, then those will be shown here as a separate group names. |
Task Implementation | The implementation class of the task.There is a default task implementation which is shipped with ESB. It is org.apache.synapse.startup.tasks.MessageInjector which just injects a message specified into Synapse environment. ESB sample 300 demonstrates this. |
Trigger Type | Trigger type for the task. This can be either Simple or Cron. A simple trigger is defined by specifying a 'count' and an 'interval', implying that the task will run a 'count' number of times at specified intervals. A cron trigger is defined using a cron expression. |
Count | The number of times the task will be executed. |
Interval | The interval between consecutive executions of a task |
Pinned servers | Provide a list of ESB server names where this task should be started for the Pinned server value. |
An Example
This example only shows how to use Task Implementation Class and fill properties of that Task Implementaion. For this example, server need to be a ESB instance.
Task Implementation Class is org.apache.synapse.startup.tasks.MessageInjector. Figure 3 shows the UI snapshot that appear after clicking the load class button. It shows the instance properties of MessageInjector.This is corresponding to the ESB sample 300.
Figure 3 . An Task Example
For more information please refer to the WSO2 library