If you do not want to be bothered to place M codes throughout, the practical way may be to place an external hardware timer relay that would replace the normal on/off relay and it would cycle on/off at preset times,
It would be picked up by a M code at the start of the pgm and another at the end to disable it.
I am not sure if Mach has a software timer function to implement this in software?
You could also place an external bybass toggle switch to effect a continuous on time.
Al.
CNC, Mechatronics Integration and Custom Machine Design
“Logic will get you from A to B. Imagination will take you everywhere.”
Albert E.