C# Best way to schedule recurring task in an efficient windows service
<p>I write a Windows Service in .Net Framework 4.0 and I need to schedule a recurring task inside. New task can only run if previous one is finished, so no tasks in parallel...
All my task occurences work on same object (WCF Channel factory).
A task takes almost 2 seconds to complete and may be scheduled every 2 seconds or every hour.
My constraint is to have this Windows service as invisible/light as possible on memory and processor uses point of view...</p>

<p>I've already found these 2 ways:</p>

<ul>
<li>Use a <code>System.Timers.Timer</code> with <code>Autoreset</code> to false => I've to
implement an <code>ElapsedEventHandler</code> and pass my shared object (WCF
Channel factory)</li>
<li>Use a never ending loop: not sure of mem/proc use in
that state but no threads aspect to take care of.</li>
</ul>

<p>Any suggestions?</p>

<p>Thanks and have a nice day!</p>