Recurring Schedules
Learn about recurring schedules within Maica and how to manage these.
Overview
Maica support the management of recurring schedules supporting the ongoing generation of either Appointments, Shifts, Unavailabilities, or Rosters. The following configuration options are available when managing Recurring Schedules.

Schedule Start
The date on which the recurring schedule starts. This is a mandatory value.
Date
Schedule End
The date on which the recurring schedule ends. This is a mandatory value.
Date (greater than Schedule Start)
Number of
Sets a specific number of either Appointments, Shifts, or Unavailabilities to be recurring.
Number
Frequency
Sets the frequency at which the recurring schedule is executed.
Daily
Weekly
Monthly
Quarterly
Annually
Repeat Every
Sets the repetition of days at which the recurring schedule is executed.
Number of Days
Exclude Public Holidays
If selected, Maica excludes any days marked as a public holiday(s) in Salesforce.
Yes/No
Scheduled Appointment Creation Logic
Within a Recurring Schedule, Maica generates Appointments based on a Schedule Horizon and forward rolling basis. Appointment records will be created for the Schedule Horizon Date Range.
To further understand the Appointment Creation Logic, see the below example:
Let's say you are creating a Recurring Schedule with the following inputs,
Schedule Horizon= 12 weeksSchedule Start Date= Jan 3, 2025Schedule End Date= Jun 3, 2025Frequency= DailyToday= Dec 3, 2024Schedule Status= ApprovedMaster Appointment!= nullMaster Appointment!= Cancelled
Then, when the daily batch is run, the following occurs:
The
Schedule Horizon End Datewill be calculated per below:Today + 12 weeks = Feb 25, 2025
Maica will create
Appointmentrecords for the period between theSchedule Start Dateand theSchedule Horizon End DateMeaning that
Appointmentrecords will be created for the period Jan 3, 2025 to Feb 25, 2025
Furthermore, when the batch runs tomorrow (in this case, Dec 4, 2024), the next Appointment, or the Appointment on the Feb 26, 2025 will be created
And so on
This Maica logic ensures Appointment Records are created for schedules within a rolling time horizon, maintaining consistent coverage and adapting dynamically as time progresses.
Roster Generation Logic
Rosters use the same Schedule record and the same rolling Schedule Horizon as Appointments and Shifts, but the way a Roster series is started differs in two important respects.
Generation only begins once the master Roster is Approved. Saving a new Roster creates the first Roster only. The remaining Rosters in the series are not generated until that master Roster is approved. Approving it generates the series forward to the Schedule Horizon immediately, rather than waiting for the next overnight run.
The daily job then rolls the series forward. The Manage Recurring Rosters scheduled job maintains the series on an ongoing basis. It processes Schedules where all of the following are true:
StatusisApprovedEnd Dateis today or laterUnder Evaluationis TRUEThe linked
Master Rosterhas aStatusofApproved
Reevaluating a Roster series
A Reevaluate action is available on the Schedule record. For a Roster series this is destructive: it deletes the future Draft Rosters and regenerates them from the Schedule's current configuration. Approved Rosters are never deleted by a reevaluate.
Schedule Evaluation Date
Maica retrieves Appointment Schedule records that will be included for Appointment processing based on a Schedule Evaluation Date field. The below information defines the field and details how the logic works in practice:
Schedule Evaluation Date: Specifies the earliest date on which Maica will include the Appointment Schedule record for evaluation to determine whether Appointment records need to be created. It is calculated as the Schedule Start Date minus the Schedule Horizon (in weeks). This ensures that the system identifies and processes Appointment Schedule records within the appropriate window for generating Appointment’s on a rolling basis. The formula is shown below.
Example:
Given Inputs:
Schedule Horizon: 12 weeksSchedule Start Date: 1st April 2025Schedule End Date: 30th October 2025Frequency: WeeklyToday: 4th December 2024
Formula:
Calculation:
Schedule Horizon = 12 weeks
12 × 7 days = 84 days
Schedule Start Date = 1st April 2025
Subtract 84 days:
1st April 2025 - 84 days = 7th January 2025
Result: Schedule Evaluation Date will be 7th January 2025.
How This Works in Practice:
Using the example above, on 7th January 2025, Appointment records for the 1st April to 24th June 2025 (12 weeks ahead) will be created.
As time progresses, the Appointment Schedule will be assessed daily and additional Appointment records will be created, maintaining the rolling 12-week horizon.
Under Evaluation Formula:
All conditions inside the AND() must evaluate to TRUE for the overall formula to return TRUE.
Under Evaluation Conditions:
maica__Schedule_Evaluation_Date__c<= TODAY()Ensures the
Schedule Evaluation Dateis on or before today's date.
TODAY() <=
maica__End_Date__cEnsures today's date is on or before the
End Date.
ISPICKVAL(
maica__Status__c, "Approved")Checks if the picklist field
maica__Status__cis set to "Approved”
Schedule Protection
Maica has logic to prevent past Scheduled Appointment being created. If the Scheduled Batch is interrupted (eg, stopped or paused) and then resumed at a later date, Maica ensures the Anchor Date is only used if the Appointment Schedule Start Date is greater than or equal to today's date. This logic prevents the creation of Appointments with dates in the past during the interrupted period.
Consider the following example:
Today's Date = 20th November 2024
An Appointment Schedule was configured to generate weekly Appointment records starting from 1st November 2024.
The batch process was interrupted on 10th November 2024, after creating Appointment records for 1st November and 8th November 2024.
When the batch is resumed, Maica evaluates and sets the Anchor Date to:
The most recent
Appointment Schedule Start Date, if it is greater than or equal to today's date; orToday's date, if the most recent
Appointment Schedule Start Dateis in the past.
By covering both scenarios, the logic ensures that the Anchor Date will always be today or a future date, never a past date.
So, if today's date is 20th November 2024, the system evaluates the most recent Appointment Schedule Start Date (8th November 2024) and determines that it is in the past. As per the logic:
The system ignores the 8th November 2024 date because it is before today's date.
Instead, it defaults the Anchor Date to 20th November 2024 (today's date), ensuring no Appointment records are created in the past.
Maica will then begin generating Appointment records starting from the next valid future date, based on the schedule's frequency.
Cancelling a Schedule
There are several ways to cancel a Recurring Schedule or an Appointment within one, depending on what you need to cancel and where you are in the schedule.
Cancel the Entire Schedule
To end a recurring arrangement completely, cancel from the Master Appointment. This cancels the Master Appointment and all remaining future Appointments within the schedule in one action. Use this option when the recurring arrangement is no longer needed at all.
Cancel the Master Appointment Only
If you cancel only the Master Appointment without cancelling the full schedule, the next scheduled Appointment in the sequence automatically becomes the new Master Appointment and the schedule continues from there.
Cancel Partway Through a Schedule
If you need to end a schedule from a specific point forward, open the Appointment you want to cancel from and select Apply changes to all future Appointments. This cancels that Appointment and all remaining Appointments after it, while leaving any earlier Appointments in the schedule untouched.
Cancel an Individual Appointment Within a Schedule
If you only need to cancel a single Appointment within a schedule — without affecting any others — open the Appointment you want to cancel and select Apply changes to only this Appointment. The rest of the schedule continues as normal.
Things to look out for
Schedules Running Old Logic After a Package Update
Owner Assignment for Recurring Appointment Batches
When generating Recurring Appointment batches, Maica automatically ensures that all cloned Appointment records are owned by an Active User. This prevents batch failures that could occur when the Owner of the Master Appointment is inactive. It works as described below:
Ownership Validation
Before generating Recurring Appointments, Maica checks whether the Master Appointment Owner is active.
If the owner is active, ownership of the cloned Appointment records is retained.
If the owner is inactive, ownership is reassigned to the current running user (the user executing the batch). This is determined in the Scheduled Jobs.
Batch Execution Conditions
If the running user is inactive, the batch or scheduled job will not execute.
This ensures only active users can trigger recurring batch generation.
The below tables outlines some Example Scenarios:
The Master Appointment Owner is active
Recurring Appointments retain the same owner.
The Master Appointment Owner is inactive
Recurring Appointments are reassigned to the current running (active) user.
The running user is inactive
The batch will not execute until rescheduled by an active user under Maica Settings → Scheduled Jobs.
This logic ensures all recurring records are owned and processed by Active Users, maintaining reliability in Recurring Appointment and Unavailability batch generation.
Recurring Appointments not created to the Schedule Horizon
In some environments, you may notice that when a Recurring Schedule is first created, only the Master Appointment is generated. The remaining appointments up to the Schedule Horizon are only created after the schedule is edited and saved again.
This behaviour is most commonly caused by organisation-level configuration, rather than an issue with the Maica package itself.
So, what causes this?
Recurring appointment generation relies on internal evaluation logic that runs at the time the schedule is created. If the Schedule Status does not meet the required criteria during this initial evaluation, the recurring logic is skipped.
This can occur when:
A default value is set on the Schedule Status picklist
The default value prevents the schedule from being evaluated as eligible on first save
The status is only updated to the expected value after the record is created
As a result:
Only the Master Appointment is created initially
Editing and resaving the schedule later triggers the remaining Appointments to be generated
Last updated
Was this helpful?