Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Scheduler Job using Mule
A sample mule flow demonstrating how
to create a schedule job in few minutes.
Concept Brief:
• Mule provides Quartz scheduler Connector
• Quartz connector to be used a in-bound
endpoint
• Use cron Exp...
cron expression
A cron expression is a string comprised of 6 or 7 fields separated by white space. Fields can
contain any ...
Using Version 3.5.2
XML
• <?xml version="1.0" encoding="UTF-8"?>
• <mule xmlns:batch="http://www.mulesoft.org/schema/mule/batch" xmlns:trackin...
Using Version 3.6
Sample XML
• <?xml version="1.0" encoding="UTF-8"?>
• <mule xmlns:batch="http://www.mulesoft.org/schema/mule/batch" xmlns:...
References
• https://docs.mulesoft.com/mule-user-
guide/v/3.7/quartz-transport-reference
• http://www.mulesoft.org/documen...
Upcoming SlideShare
Loading in …5
×

Scheduler job using mule

731 views

Published on

Scheduler job using mule

Published in: Software
  • panels searching for survey takers! ➽➽ https://t.cn/A6ybKmr1
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

Scheduler job using mule

  1. 1. Scheduler Job using Mule A sample mule flow demonstrating how to create a schedule job in few minutes.
  2. 2. Concept Brief: • Mule provides Quartz scheduler Connector • Quartz connector to be used a in-bound endpoint • Use cron Expression or MMC option for defining scheduled time. • Job name should not have special character like _ etc • Repeat count can be defined.
  3. 3. cron expression A cron expression is a string comprised of 6 or 7 fields separated by white space. Fields can contain any of the allowed values, along with various combinations of the allowed special characters for that field. The fields are as follows: • Field Name Mandatory Allowed Values Allowed Special Characters • Seconds YES 0-59 , - * / • Minutes YES 0-59 , - * / • Hours YES 0-23 , - * / • Day of month YES 1-31 , - * ? / L W • Month YES 1-12 or JAN-DEC , - * / • Day of week YES 1-7 or SUN-SAT , - * ? / L # • Year NO empty, 1970-2099 , - * / cron expressions can be as simple as this: * * * * ? * • or more complex, like this: 0/5 14,18,3-39,52 * ? JAN,MAR,SEP MON-FRI 2002-2010
  4. 4. Using Version 3.5.2
  5. 5. XML • <?xml version="1.0" encoding="UTF-8"?> • <mule xmlns:batch="http://www.mulesoft.org/schema/mule/batch" xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns:quartz="http://www.mulesoft.org/schema/mule/quartz" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" • xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.6.0" • xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" • xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd • http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd • http://www.mulesoft.org/schema/mule/quartz http://www.mulesoft.org/schema/mule/quartz/current/mule-quartz.xsd • http://www.mulesoft.org/schema/mule/batch http://www.mulesoft.org/schema/mule/batch/current/mule-batch.xsd • http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd"> • <quartz:connector name="Quartz" validateConnections="true" doc:name="Quartz"/> • <flow name="quartz_jobFlow"> • <quartz:inbound-endpoint jobName="myjob" repeatInterval="60000" connector-ref="Quartz" responseTimeout="10000" doc:name="Quartz" repeatCount="2" startDelay="30000"> • <quartz:event-generator-job/> • </quartz:inbound-endpoint> • <set-variable variableName="temp" value="Message" doc:name="Variable"/> • <logger message="#[flowVars.temp]" level="INFO" doc:name="Logger"/> • </flow> • </mule>
  6. 6. Using Version 3.6
  7. 7. Sample XML • <?xml version="1.0" encoding="UTF-8"?> • <mule xmlns:batch="http://www.mulesoft.org/schema/mule/batch" xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns:quartz="http://www.mulesoft.org/schema/mule/quartz" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" • xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.6.0" • xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" • xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd • http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd • http://www.mulesoft.org/schema/mule/quartz http://www.mulesoft.org/schema/mule/quartz/current/mule-quartz.xsd • http://www.mulesoft.org/schema/mule/batch http://www.mulesoft.org/schema/mule/batch/current/mule-batch.xsd • http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd"> • <quartz:connector name="Quartz" validateConnections="true" doc:name="Quartz"/> • <flow name="quartz_jobFlow"> • <quartz:inbound-endpoint jobName="myjob" repeatInterval="60000" connector-ref="Quartz" responseTimeout="10000" doc:name="Quartz" repeatCount="2" startDelay="30000"> • <quartz:event-generator-job/> • </quartz:inbound-endpoint> • <set-variable variableName="temp" value="Message" doc:name="Variable"/> • <logger message="#[flowVars.temp]" level="INFO" doc:name="Logger"/> • </flow> • </mule>
  8. 8. References • https://docs.mulesoft.com/mule-user- guide/v/3.7/quartz-transport-reference • http://www.mulesoft.org/documentation- 3.2/display/MULE2USER/Quartz+Transport

×