Control relay with a constant delay but also with IR remote

Hi
I want to make an automatic watering system for my plant. I have build all the hardware, but now i need help to the code. So, i want it to turn the relay on for 5 seconds every 6 hours. Well that is simple enough. But i also want to turn the relay on with a IR remote. The thing is that if i use the delay command it pauses the entire code and i want it to search for inputs at the same time. So, what should i do?
Plz. help! I have been searching around and i haven't found any good results.

Best regards
Jens

THANKS!

See the very FIRST post at the top of this forum? Study it and you will learn how to do what you want.

Paul

Read this:
SeveralThingsAtTheSameTime
https://forum.arduino.cc/index.php?topic=223286.0

Use CTRL T to format your code.
Attach your ‘complete’ sketch between code tags, use the </> icon in the posting menu.
[code]Paste your sketch here[/code]

Show us a good schematic of your circuit.
Show us a good image of your wiring.
Give links to components.
Posting images:
https://forum.arduino.cc/index.php?topic=519037.0

Hi
I dont have a code to insert. That is what i need. I have a schematic of my wiring and i have a picture of my wiring. (dont know if the relay is wired properly in the diagram.)