Help triggering a function based on date.

Help triggering a function based on date.

I'm trying to write a function and i'm just having a trouble figuring out what trigger to use.

I want the function to run based on a date field.  If the date is in the future, i don't want the function to run until the following day.  Or if the date entered was in the past i want the function to run immediately.

Example: I have a field, let's call it TriggerDate.  Today is March 21st, 2023.  If i enter 2/28/2023 I want the function to run immediately.  However, if i enter 3/31/2023, i want the function to run when as we pass midnight on 3/31/2023 heading into 4/1/2023.

Is there a way to execute this function with 1 trigger? or would I have to do to?  I imagine I could use a date/time trigger, and i could also use an on edit trigger and have it dependent on triggerDate AgeInDays?