To run a flow automatically on a predetermined schedule, it is necessary to use the Scheduler component. You can read about this component in the documentation; https://docs.mulesoft.com/mule-runtime/4.1/scheduler-concept.
While this component has no concept of a "single run", it is possible to emulate this behaviour with the following options:<mule xmlns:scripting="http://www.mulesoft.org/schema/mule/scripting" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.mulesoft.org/schema/mule/scripting http://www.mulesoft.org/schema/mule/scripting/current/mule-scripting.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd"> <flow name="singleRunAtStartupFlow" doc:id="3e1a1585-7a33-4c16-ab4c-1415bfc3515c" > <scheduler doc:name="Scheduler" doc:id="907d3d0b-ecc6-4d87-a364-3e6ef3829849" > <scheduling-strategy > <fixed-frequency frequency="10000" timeUnit="DAYS"/> </scheduling-strategy> </scheduler> <logger level="INFO" doc:name="Logger" doc:id="541e1a54-a4ef-4bee-b89a-cd35db033473" message="Perform some actions"/> <scripting:execute engine="groovy" doc:name="Stop flow after completion" doc:id="1ea52b1b-f728-4e1a-8619-78180c63cb29" > <scripting:code >flow = registry.lookupByName("singleRunAtStartupFlow").get(); if (flow.isStarted()) flow.stop()</scripting:code> </scripting:execute> </flow> </mule>
001114475

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.