<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd">
<flow name="componentsFlow">
<scheduler doc:name="Scheduler" disallowConcurrentExecution="true">
<scheduling-strategy >
<fixed-frequency frequency="1000"/>
</scheduling-strategy>
</scheduler>
</flow>
</mule>
Scheduler XML Reference
Standard Support for Mule 4.1 ended on November 2, 2020, and this version of Mule reached its End of Life on November 2, 2022, when Extended Support ended. Deployments of new applications to CloudHub that use this version of Mule are no longer allowed. Only in-place updates to applications are permitted. MuleSoft recommends that you upgrade to the latest version of Mule 4 that is in Standard Support so that your applications run with the latest fixes and security enhancements. |
A XML for the Scheduler has these elements:
-
scheduler
parent element that encloses the rest of the elements. -
scheduling-strategy
block insidescheduler
. -
fixed-frequency
orcron
element inside thescheduling-strategy
block.
<scheduler>
Properties
Attribute | Description | Example |
---|---|---|
|
Skips the next scheduled flow execution if the last one has not ended. Next attempt to execute will be after another frequency period. Default value is |
|
<fixed-frequency>
Properties
Attribute | Description | Example |
---|---|---|
|
Triggering frequency, relative to time unit. When set to |
|
|
The time unit for the frequency and startDelay values: MILLISECONDS, SECONDS, MINUTES, HOURS, DAYS |
|
|
Upon triggering the flow for the first time, Mule delays the first execution of the scheduler for a specific amount of time. This time period is expressed in the same time units as the frequency. |
|
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd">
<flow name="componentsFlow">
<scheduler>
<scheduling-strategy>
<fixed-frequency startDelay="5" frequency="10" timeUnit="SECONDS"/>
</scheduling-strategy>
</scheduler>
<logger message="my message"/>
</flow>
</mule>
<cron>
Properties
For more complex scheduling strategies, you can use a cron expression.
Parameter | Default Value | Description | Example |
---|---|---|---|
|
- |
Use a cron expression for when to do a trigger. |
|
|
Time zone passed as system property, or in machine’s operating system. |
Timezone in Java time zone format |
|
Example that uses a cron expression:
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd">
<flow name="componentsFlow">
<scheduler>
<scheduling-strategy>
<cron expression="0 0 12 * * ?"/>
</scheduling-strategy>
</scheduler>
<logger message="my message"/>
</flow>
</mule>