I did something similar in the past, copying classes + linked students from an existing one and according to some parameters that the user should introduce: start-end of the classes period (Sep 1st to Jun 30), recurrent days (7, 14…), include or not the students and teachers
The complexity of the situation cannot be handled by a simple automation. This is what I did:
Created a button field in the classes table
I linked a code block to the button press event
The code block got the record that fired the event and extracted the basic data: Location, time, duration, day of the week and the students in that class (linked record ids)
In the code block the user could enter the parameters for the copy: starting and ending date for the block of classes, the periodicity, and if they wanted to include the same teacher or not (teachers are in a linked table)
These selection of data can be added to the code block in different ways, it’s not straightforward but doable. You can experiment with the input functions as (await) input.buttonsAsync, input.textAsync, input.tableAsync, etc. The API documentation is good enough.
Once the user validated the parameters, the code worked as
Loop over the new dates of the class using the period as incremental index
Create a new class for the new date using the original class parameters (time, location…)
It took me a while to set everything up, but in the end it worked fine and saved a lot of time to my users.
If you would like more detail, let me know and I can prepare a deeper explanation.
I hope this helps, good luck