Also just for a sanity check is this how i would implement that?
The loop function loops. Your function will NOT have a for loop in it. It will check the current time against the last time something happened, to decide if it is time to do something. If it is, it will determine what to do, based on global or static variable values.
In the 40 minutes between the last two posts, you can not have spent any serious time working out how YOU (NOT the Arduino) would do what needs to be done. So, take that time now.