Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Info
iconfalse

Scheduled Tasks are one of many well-defined extension points supported by the WSO2 Governance Registry. Read more on Supported Extension Points for a complete list of extension points supported by WSO2 Governance Registry.

To schedule tasks using Governanace Registry and the following configuration at [CARBON$GREG_HOME]/repository/conf/registry.xml

Code Block
<tasks>
    <task name="SampleTask" class="org.wso2.carbon.registry.samples.task.SampleTask">
        <trigger cron="0/10 * * * * ?"/>
        <property key="foo" value="FooVal" />
        <property key="bar" value="BarVal" />
    </task>
</tasks>

The attributes of the given above configuration can be defined as below.

  1. name - A name to distinguish this task from other tasks. This has to be a unique name in a single clustered or non-clustered deployment.

  2. class - The fully qualified name of the class implementing the org.wso2.carbon.ntask.core.Task interfaceYou can have more than one task having the same class.

  3. cron - http://quartz-scheduler.org/documentation/quartz-1.x/tutorials/crontrigger

  4. property - a property that is passed into the setProperties method of the Task implementation class. You can have more than zero or more properties for you task.
    1. key - the name of the property.
    2. value - the value of the property.
Info

It is important to restart the server after a configuration change.

See also Scheduled Task Sample.

Excerpt
hiddentrue

Description of scheduled task configuration details.