Immediately on save (new or edited)
The moment you press Save on a new or edited repeating class, the backend calls refreshCalendarAdmin with the recurring class id. That function walks forward day-by-day from today through the visible calendar window and inserts a class-schedule entry for every weekday the recurring class applies to. By the time the save response returns, you can refresh the admin calendar and see every upcoming instance already in place.
The same thing happens when you edit a recurring class — for example changing the time, instructor, or room. The system regenerates the affected calendar slots immediately so the changes are visible without waiting for an overnight job.
The daily refresh job
Outside of save events, a background job — calendar_refresh.php — runs once per day. It does two things:
- For every recurring class with an end date in the future (or no end date), it generates any upcoming class instances that aren't already on the calendar. This is how new weeks keep appearing as time passes — without this job, a class set to repeat "forever" would eventually run out of generated instances.
- For class-schedule rows that fall outside the recurring rule's current window (e.g. you shortened the end date), it removes them safely if they have no customer bookings attached.
What this means for you
- You never need to wait for an overnight job after creating or editing a repeating class. Refresh the calendar and the new instances are already there.
- If you push a recurring class's end date far into the future, you don't have to do anything else — the daily job will keep generating instances as the calendar window rolls forward.
- If the daily job hasn't run yet and you don't see an instance for, say, a week from now that you expected, edit and re-save the recurring class to trigger an immediate regeneration.
