The best design for ongoing and planned tasks

I have a requirement when I need some tasks to be performed all the time, and some others should be run only on schedule, but I'm not sure what the best way to handle this scenario should be.

For scheduled tasks, I thought that I would use a thread pool, and for tasks that work on an ongoing basis, I thought that I would only have an array of threads that will be created and started as mine starts Windows Service.

Is this the right and / or best approach, or is there a better way to handle this?

Please note that I need to be able to cancel the running task regardless of whether it is planning and / or constantly running.

thank

PS: Please note that this question has been completely reformulated, since it was initially too broad. Hope this is the best attempt.

UPDATE:

Please note that this issue does not concern the scheduler, but rather what is best suited for processing my threads based on my 2 requirements, i.e. scheduled and continuous.

Sorry for any confusion.

+4
source share
1 answer

, . , : Quartz.NET ( , ) Windows.

Quartz.NET ( ), Windows Scheduler ( TSMW), , API.

+2

Source: https://habr.com/ru/post/1656577/


All Articles