Help With Making Changes to an Event based on Parameters

Hi there,

I have a calendar app where an admin user creates events for other non-admin users (who are created/invited to join the app by the admin user).

I want to have a function that goes like this:

-Events are created in the admin calendar
-On another page, there are parameter options listed (number of events per week per user, schedule users based on their availability, etc). Then, a date range is picked. Then, a button is clicked. The system will then go through the list of events within the date range. It will assign 1 user to the first event based on the chosen parameters. Then it will move on to the second event, assign a user to it, and on and on until the events are all assigned.

I just need some direction on how to get started on this, if anyone has any pointers at all!

Thank you!