Demystifying Bot Scheduling in MuleSoft RPA Manager

Photo of Santosh Sundar Written by Santosh Sundar,   Dec 20, 2023

Introduction

Robotic Process Automation (RPA) progresses through distinct phases in its project life cycle. When it enters the production deployment phase, the bots are deployed onto dedicated machines to carry out end-to-end automation. It is at this stage that scheduling comes into the picture, guiding bots on when to run and on which machine.


The scheduling step is relevant for bots that run in an unattended/automatic way at specific intervals (often many times a day!). However, it does not apply to bots that are attended or triggered by human or system actions.

Within MuleSoft RPA Manager, the scheduling feature follows the same pattern! When a bot moves from test to production phases, the developer or the architect should create a bot schedule configuration. Where MuleSoft differs is in the introduction of service times, which are specific to the virtual machine (VM) availability, dictating when the bot should run.

Now compare this to other vendors (for example, UiPath). Here, the deployment includes a step where you choose the bot process, the VM on which it will run and the designated time slots all at once. At first glance this might seem to be a simple solution to deploy. However, this assumes that the VM is available 24x7 which is not the case when it comes to MuleSoft. In my opinion, this has both benefits and drawbacks:

  • On one hand, it’s good in the sense that it helps developers to define specific times when the VM is available and other times when it is free for maintenance. Even more, it can help save costs by allowing companies to automatically switch it off during off-peak hours.

  • On the flip side, developers will need to create two separate entities - the schedule at the process level and the service times for the bots. We also have the application downtimes, but that can be ignored for the scheduling discussion for time being.

A key difference between service times at the VM level and schedules at the process level is that while schedules need to be created for every process individually, service times are created only once and can be added for as many bot VMs as needed.

MuleSoft bot scheduling in production

A bot process is run/triggered successfully when the schedule to run the process, the service time of the VM and the application available (no downtime) windows all overlap. The scheduled bot checks every minute whether it is within a service time and whether the required process applications are outside all downtimes. If the bot is outside its service time or if one or more of the process applications used by the bot are within a downtime, the process will not execute.

mulesoft-scheduling



Now, let's cover the definitions of schedule, service time and application downtimes.

What is a Schedule?

A schedule is timeframe in which a process can be run. It is associated with the robotic process that needs to be run on a specific VM. The productive run is carried out continuously within a fixed schedule. For each schedule, you can define time intervals within which the process is executed.

You create a schedule without specifying a time zone - the bot you assign the production configuration to executes the process at the specified times in its local time. The time intervals might change, depending on daylight saving time.

You can create multiple schedules, which may overlap. All schedules together make up a time frame within which the process is executed. As mentioned, the executing bot will check every minute whether it is within this time frame or not. A new process run is not started until all conditions have been fulfilled.

To create schedules in MuleSoft, navigate to: Process Automation → Project → Production configuration → Process Trigger Execution → Schedule

What is Service Time?

Service times are repeatable time intervals that define when a service is available. You assign them to bots to determine when they should execute processes. It’s important to note that you specify the service time specific to one time zone. If the bot that you assign the service time to is installed on a computer with a different designated time zone, the service time interval is converted to the bot’s time zone.

To create a service time on MuleSoft go to: Bot Management → Service Times → Create Service Time

To add service time to a bot go to: Bot Management → Bots → Edit Bot → Assign Service Time

What is Application Downtime?

Downtimes are repeatable time intervals that define when an application is unavailable. Processes whose applications are currently down are executed to completion and not restarted until the downtime period ends.

Like with service times, a downtime is designated to the time zone in which it occurs. If the bot you assign the downtime to is installed on a computer using a different time zone, the downtime interval is converted to the bot’s time zone.

To create Application Downtimes on MuleSoft go to: Process Automation → Process Applications → Edit Process Applications → Create Downtime

mulesoft-bot-management

 

We’d love to hear your opinion on this post