Contact Free trial Login

Managing Schedules (CloudHub)

The Schedules tab in the left navigation menu of the CloudHub console enables you to view and control any polling elements within the flows of your deployed applications. On this tab, you can manage polling elements, change the polling frequency, or run polls immediately, all during runtime, without making any changes in the underlying application.

Use Cases

The Schedules tab is useful in the following scenarios:

  • You have a job that runs nightly but you want to debug it now.

    You can trigger the job while it’s running without updating the schedule in your underlying application.

  • You want to change the schedules in your application at runtime without redeploying.

  • You want to disable a scheduled job while one of the applications you are connecting to is undergoing maintenance.

  • You want runtime visibility into the schedules in your application.

Considerations

When using the Schedules tab, consider the following:

  • Schedulers are managed by CloudHub and are triggered in only one worker even if more are available.

  • Setting a polling schedule for less than a 10-second frequency between calls is not recommended.

  • If a scheduled job is not triggered one or more times because the application is down, CloudHub triggers the job as soon as the application restarts.

  • CloudHub scheduler reads the job configuration every time it runs.

    To apply your changes immediately, run your jobs manually after updating the schedule.

  • If poll execution time takes longer than 12 hours, the scheduler fails and is re-executed.

  • You cannot manage CloudHub schedules using scripts.

    Use the CloudHub API or Schedules tab in Runtime Manager to manage CloudHub schedules.

View Application Schedules in the Console

To use the scheduling feature in Runtime Manager, deploy an application that includes one or more polling elements. This example includes two simple flows, each with a polling scope:

Studio Visual Editor

scheduling+cloudhub

Studio XML Editor

<mule xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" 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" 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/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd">

    <flow name="synchronize-accounts" doc:name="synchronize-accounts">
        <poll frequency="300000" doc:name="Poll">
            <logger level="INFO" doc:name="Start" message="Start Account Synchronization ${salesforce.username}"/>
        </poll>
        <logger level="INFO" doc:name="End" message="End Account Synchronization"/>
    </flow>
    <flow name="synchronize-contacts" doc:name="synchronize-contacts">
        <poll frequency="600000" doc:name="Poll">
            <logger level="INFO" doc:name="Start" message="Start Contact Synchronization ${salesforce.username}"/>
        </poll>
        <logger level="INFO" doc:name="End" message="End Contact Synchronization"/>
    </flow>
</mule>

CloudHub synchronizes your schedules automatically, overriding any synchronize property set on the flows containing the polling scopes, so that you don’t need to perform any other special configuration.

After deploying an app, you can view the polling elements in Runtime Manager by selecting the app and clicking Schedules in the left navigation menu. Runtime Manager lists the polling elements in your application in the order they appear in your application:

View Schedules

The name of each element is determined by the doc:name attribute in the polling scopes, if specified in the XML. If you do not specify doc:name, CloudHub applies the name, yourFlowname Poll.

The Last Run column shows the date and time each polling element last ran. You can view the logs to see more information about when the jobs started and ended scheduled runs.

Manage Schedules at Runtime

To manage schedules in Runtime Manager:

  1. Click Applications in the left pane, click the app, and then click Schedules:

    View Schedules
  2. Select the elements to manage, then:

    • Click Run now to override the schedule and run the job immediately.

    • Click Disable to suspend a polling element.

      CloudHub does not run the polling job until you reenable it.

    • Click the frequency of a polling element in the Schedule column to open the schedule editor:

      Set Polling Frequency

      In the schedule editor, change the polling frequency of the element or deselect Enabled to disable the polling schedule.

      You can also use cron expressions to create more specific schedules, such as "every Thursday at 3:00 pm".

  3. Click Update to save changed settings or click Cancel to exit without saving.

  4. Click Logs in the left navigation menu to verify that the job you selected ran as expected.

Use Cron Expressions

With cron expressions, you can create more complex polling frequencies, such as "every 5 minutes between 9:00 am and 10:00 on Fridays".

To use cron expressions to specify the polling frequency:

  1. In the schedule editor, click Switch to advanced mode.

  2. In the advanced mode page, click Quick reference to expand the table that lists required fields and allowed values:

    Schedule Advanced Mode Expanded

    The cron expression in this example sets the polling schedule to every 10 seconds.

    On this page:

    • Click more to view the Quartz documentation for information about building cron triggers.

      Select a version, click Documentation > User’s Guide > Tutorial, and then click Lesson 6: CronTrigger.

      All schedules are based in the UTC timezone, regardless of what region your CloudHub workers are in, so the timezone configuration is ignored.

    • Click Switch to basic mode to exit advanced mode.

  3. Click Update to save changed cron settings or click Cancel to exit without saving.

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.