digital output (count down) while analog data is in acquisition

Sorry, next time i'll post it correctly.
What i need to do is control some solenoid valves with the dig out (for example every 10 minuts i need to switch off and then after other 10 minuts switch back on and so on) and acquire temp and humidity data every 5 seconds. As i told you i'm not an expert so be patient.
thanks.
Andrea.