need help scheduling pumps turning of and on

hello all
what i would like to accomplish is

1 turn on a pump at 8:00 pm or 20:00

2 turn that pump off at a predetermined time to pump a certain amount of fluid. for example 8:02 pm or 20:02 whatever amount it takes to pump 4 fluid oz.

3 turn another pump on at say 8:15 pm or 20:15
then turn it off at a predetermined time so that the second pumps for a predetermined time to pump approximately 4 fluid oz. etc.etc.

this needs to control 4 pumps in total.

so far in my searches Time Alarms seems to be what i need to be using but all the
void pump1 on()
void pump1 off()
coding seems like an excessive way of obtaining what i want to accomplish should i be looking at some other way of doing this and if so can you please point me in the right direction.
i am not a total noob at arduino but i do not know the more elegant ways to accomplish such things

thanks for you help James

Did you already add a RTC (Real Time Clock) to your Arduino?

i am using a mega 2560 with a DS3231 RTC and a 20x4 LCD and 24 relays running various pumps and solenoid valves, and monitoring 7 float switches and using 3 ultra sonic sensors also to monitor water levels. and 3 temp sensors.
this system i am putting together controls the various function on my saltwater aquarium.

I would have thought TimeAlarms was ideal. I use an if to get a 2 second window at midnight.

  if (hour == 0 && minute == 0 && second <2)

You could do something similar, like

  if (hour == 20 && minute ==  <15 && flag)
else don't

i am barely a notch above a noob to arduino all my searches pointed to time alarms for what i want to accomplish. i just wanted to know if there was a better way to accomplish it. LOL

I use the above method because I have to get the time every loop cycle anyway and I have just one job, once a day, so I didn't think TimeAlarms was worth the effort. As you can see, it creates a window of operations. It is elegant enough, but I think TimeAlarms is probably a better way to go if things get more complicated.

ok thanks nick

i will continue on with time alarms coding for what i am doing.
i know that the way the library is written there is only 6 alarms that you can do without going into the .h file and making some changes there.
you wouldn`t happen to know if there is a maximum limit of alarms you can specify do you?

No, I'm afraid not. I have just used it for four daily windows to calculate power4 bills. I wasn't aware of any limit!