This documentation is for WSO2 Enterprise Service Bus version 4.7.0 . View documentation for the latest release.

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

3. In the "Manage" menu, click on "Source View" under "Service Bus."

4. Add a necessary piece of code to "Service Bus Configuration." In the source view, add the task configuration based on your requirement.

Examples

Anchor
interval
interval

To run every 5 seconds continuously:anchorintervalinterval

Code Block
<task name="CheckPrice" class="org.wso2.esb.tutorial.tasks.PlaceStockOrderTask">
<trigger interval="50005"/>
</task>

To run every 5 seconds for 10 times: 

Anchor
specified number of times
specified number of times

To run every 5 seconds for 10 times: 

Code Block
<task name="CheckPrice" class="org.wso2.esb.tutorial.tasks.PlaceStockOrderTask">
<trigger interval="50005" count="10"/>
</task>

Anchor
cron style
cron style

You can also give cron-style values. To run daily at 1:30 AM:anchorcron stylecron style

Code Block
<task name="CheckPrice" class="org.wso2.esb.tutorial.tasks.PlaceStockOrderTask">
<trigger cron="30 1 * * * *"/>
</task>

Anchor
once
once

To run only once after ESB starts: Anchoronceonce

Code Block
<task name="CheckPrice" class="org.wso2.esb.tutorial.tasks.PlaceStockOrderTask">
<trigger once="true"/>
</task>

...