Task with Timer crashing a program
<p>I've a little program, that parses all the log files created by another program, and locked by it ( so, no way I can edit or delete those files) . The program runs just fine, and I do it starting a new Task every 10 seconds:</p>

<pre><code>System.Timers.Timer aTimer = new System.Timers.Timer();

public Form1()
{
    InitializeComponent();

    aTimer.Elapsed += new ElapsedEventHandler(OnTimedEvent);
    aTimer.Interval = 10000;
    aTimer.Start();
}

private void OnTimedEvent(object source, ElapsedEventArgs e)
{
    var t = Task&lt;int&gt;.Factory.StartNew(() =&gt; convert());
}
</code></pre>

<p>the only problem arises when there are too many log files : if a new Task is started before the end of the previous one, the program crashes.
So, any idea on how to solve this behaviour, or better solutions to the problem?</p>
