Time and TimeAlarms Libraries – Ask here for help or suggestions

Just a passing suggestion.

It seems like what you're describing is a set of modes. One mode for a period of time, and then another, and so on.

One thing you could do is use the Arduino's EEPROM (non-volatile RAM) to write the current mode, so that on power-cycle it can restart in the last mode, where it left off. You could likewise do something like tick off the number of hours in that mode, so your recovery to the last mode could also be a little more granular than just a restart from the beginning.

EEPROM tips here: http://arduino.cc/it/Tutorial/EEPROMWrite