I have requirement where I need to have some tasks to run permanently while some other should just be run on a scheduled basis but I'm not sure what the best way to handle this scenario should be.
For the scheduled jobs, I thought I'd use a Thread Pool and for jobs running permanently, I thought I'd just have an array of threads that would be created and started as my Windows Service
starts.
Is that a correct and/or best approach or is there a better way to handle this?
Note that I need to be able to cancel a running job whether it be scheduled and/or permanently running.
Thanks
PS: Please note this question has been totally re-phrased as it was originally too broad. I hope this is a better attempt at it.
UPDATE:
Please note this question is not about a scheduler issue but more on what is the best approach to handle my threads based on my 2 requirements i.e. scheduled vs continuous.
Sorry for any confusion.