Some are left on continously, however one needs to understand that the parts of the engine that are protected by anti-icing consists of the lip around the inlet and the spinner in the middle of the first stage compressor blades as well as the engine�s front and rear inner compressor stators which are heated with warm air that comes from, manufactured, if you will, the engine in the first place. This is called bleed air since it's bled off from the highly compressed air before it is mixed with fuel and ignited. Any bleeding off of this air greatly affects the performance of the engine. By the way, it's this same air that is used to pressurize, heat and cool the interior as well as de-ice/anti-ice the wings and tail sections. On older transport category aircraft, icing conditions are monitored by the pilot's looking for signs of having entered these conditions, such as ice build up on windshield wipers or other small, easily scanned parts. On newer aircraft, an automatic ice detection system is installed to alert the crews of the presence of ice...
Engine anti-icing is used on the ground as well and you may have noticed that in such conditions, as the aircraft is cleared for take-off, the crerw taxi's the aircraft into position at the end of the runway and runs the engines up to a fairly high setting for at least 20 seconds before take-off. This permits the "bleed air" to warm the exposed parts of the engine, and especially sensors that operate engine power output instruments for the pilots...