Scheduling algorithm with defined starting intervals and processing times
For this particular problem, you have an evident solution. If you work only in seconds, you have GCD(5min, 8min) = 60s. Moreover the sum of the required times of opening is $3\times 5 + 3 \times 10 = 45 s$.

Thus, you can assign to each valve an offset in the 60s period without any risk of collision. Then, you can decide independently for each valve for each 60s period if you actually use the assigned slot or not. That is to say one every 5 periods for valves 1, 2, 3 and every 8 periods for valves 4, 5, 6.