I want to turn a relay on after lets say 2 minutes stay on for say 5 minutes and then turn off. The way the code is now it keeps looping. the problem I have is, When I write "for(;;){}" the relay stays on forever. The same thing happens when I put the code in the void setup
In other words, the switch doesn't work. The code is fine, it can be improved don't change it yet. Have you tested the switch with some simple code to see if it goes on/off?
You begin() a serial object and then don't use it.
To make it work reliable you have to connect the ground of the computer with the ground of the arduino
Or if you don't want this you would have to use an optocoupler.
What does the +5V and Ground and 10 kOhm-resistor do?
What kind of relais are you using?
relais pull quite some current. And if the coil is switched off a voltage-spike occurs which could damage your board if you don't use a freewheeling diode anti-parall connected to the relay's coil
You shouldn't connect 5V from an external device directly to an Arduino input pin (pin 2 in this case). Especially a 5V power source. You need to add at least a series resistor for protection of the Arduino. Your "pull down" resistor makes no sense. It's in parallel with the power supply, so can't have any pull down effect. All is does is drain a tiny bit of power from the supply.
When you draw a schematic, there should be no mysteries. Any line that goes into a box must be labelled, otherwise it is useless. Nobody can tell where the wires to your relay module are connected.