Contact Free trial Login

Manage Schedules

logo cloud active logo hybrid disabled logo server disabled logo rtf disabled

You can use Runtime Manager to view and control the Scheduler components within the flows in your deployed applications. Use the Schedules tab in the left navigation menu to enable or disable Scheduler elements, change the frequency, or run the scheduled job immediately, all without changing the running application.

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 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 and Limitations

When using the Schedules tab, consider the following:

  • CloudHub manages the Schedulers and triggers them in only one worker, even if more are available.

  • All schedules are based in the UTC timezone, regardless of the geographic region where your application is deployed.

  • The minimum recommended frequency is 10 seconds between calls.

  • If a scheduled job is not triggered because the application is not running, CloudHub triggers the job as soon as the application restarts.

  • When a schedule is used to trigger a flow with subflow in a Mule 4.x application, it waits until both main flow and subflow complete before scheduling the next run.

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

    When you update the scheduler configuration, the change takes effect the next time the scheduler runs.

  • If the execution time for a job is longer than 12 hours, network issues occur, or the infrastructure restarts due to hardware issues or scheduled maintenance, 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 and Manage Application Schedules in Runtime Manager

To use the scheduling feature in Runtime Manager, deploy an application that includes one or more Scheduler elements:

Scheduler component in the Anypoint Studio canvas
Figure 1. The arrow shows the Scheduler component in the Anypoint Studio canvas.

You can download this example app from Exchange.

After deploying an app to CloudHub, view and manage the Scheduler elements in Runtime Manager:

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

    Logs option
    Figure 2. The screenshot shows (1) the Logs option, (2) the Last Run column, and (3) the frequency link on the Schedules page.

    The Last Run column shows the date and time each Scheduler element last ran. You can click Logs in the left navigation menu to see more information about when the jobs started and ended scheduled runs.

    Runtime Manager lists the Scheduler elements in the order that they appear in your application.

  2. Select the elements to manage and then:

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

    • Click Disable to suspend a Scheduler element.

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

    • Click the frequency link in the Schedule column to open the schedule editor:

      Switch to advanced mode link in the schedule editor
      Figure 3. The arrow shows the Switch to advanced mode link in the schedule editor.

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

      The value for the frequency can be between 1 and 100 seconds.

      You can also switch to advanced mode to 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.

Use Cron Expressions

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

To use cron expressions to specify the schedule frequency:

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

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

    Quick reference toggle
    Figure 4. The screenshot shows (1) the Quick reference toggle, (2) the more link, and the Switch to basic mode link on the advanced mode page.

    The cron expression in this example sets the 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 the CronTrigger lesson.

      Because all schedules are based in the UTC timezone, 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.

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub