Creating Cron Jobs in C #

I am writing an application like Scheduling in C # and letting the user store tasks that they want to run at a specific time. Now I give them the opportunity to indicate how often to run it (Daily / Weekly / Monthly), as well as indicate the time, which is then stored in the database.

I have a little problem just wrapping around pseudo-code, and I'm looking for some suggestions on how to implement it. I run a repeating timer every 60 seconds to check each task to see if it needs to be run, but it always seems to hit road blocks when I need to work with date / time and adding a repeating day (daily / weekly / etc .d.), this is even more.

+6
source share
1 answer
+2
source

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


All Articles