TN Reprocessing failed delivery tasks in batch

Currently, we have a schedule service to restart all the failed delivery tasks in TN. Basically, I want to only have 1 service thread for restarting all the failed tasks. Because if I loop through the failed tasks and call, it will execute all these failed tasks simultaneously. I only want to execute 1 at a time.

Is this possible and have anyone done this before…??


Just an idea:

-get task id’s that failed
-loop over task id’s
—sleep a few seconds