Can a linear regulator be cycled on and off repeatedly without damage?
In your other question you talk about powering a solenoid over a variable length  wire ('1000+ft away') using the regulator to drop 24 V down to 12 V at the solenoid. Your solenoid draws 6.5 W at 12 V, which corresponds to ~0.542 A.
At this current a 7812 needs a minimum of about 2 V of 'headroom' to maintain regulation, which will be the voltage drop at maximum wire length. At 0.542 A this corresponds to a power dissipation of ~1.1 W. Shorter wires will make the regulator drop more voltage and dissipate more power, eg. at 4 V it would dissipate ~2.2 W. Maximum power dissipation (with appropriate heat sink) could be as high as 25 W and is internally limited, so you might think it isn't a problem. But...
The bare TO220 package has a thermal resistance of 50 °C/W, so at an ambient temperature of 25 °C the die temperature could reach 135 °C - close to the thermal limit of ~150 °C. Without a heat sink it may work, but put a lot of thermal stress on the die each time the power is turned on and off. Putting a good sized heat sink on it will help, but the thermal stress issue remains.
The cycle time of 10 seconds is bad because it gives the die time to cool down when turned off and heat up again when turned back on. Different parts of the regulator expand at different rates as the temperature changes, which could result in early failure due to fractures between the die and bonding wires. Accelerated testing may not pick this up.