Flame programmer

A flame programmer is an electrical, electro-mechanical, or electronic device used to program the safe lighting of fuel burning equipment, as well as the safe shut-down of the flame when it is not needed.
These programmers are made with different time sequences to accommodate very small household furnaces to mammoth industrial steam boilers and many other fuel burning processes in industry.
A typical cycle.
Pre-purge.
During pre-purge, the combustion air fan is started and the dampers are opened to allow fresh air into the combustion chamber and exhaust any other gases or residual air-fuel mixtures.
Pilot trial.
In the pilot trial, the pilot solenoid is opened and the ignition transformer is turned on. The fuel is lit to make sure the pilot flame stays lit. There is a flame detection device that will shut down the fuel valve if the flame fails or goes out 
Main-flame trial.
With the pilot still burning, the main burner valves are opened and the main flame is lit. The flame detection device here will also shut-down or close all the fuel valves if the flame is extinguished.
Run.
The pilot valve is shut and the main burner is left on and burning. The flame detector remains operational to kill the fuel valves if the flame should fail.
Post-purge.
When the flame is no longer needed, the fuel valves are shut and the combustion air fan is left running to clear the combustion chamber of all unburnt fuel and products of combustion. The combustion air fan is shut down after a period of time.