Need help writing a recurring task scheduler

I need to write a tool that will run a recurring task in user-customizable graphics. I will write it in C # 3.5 and it will work on XP, Windows 7 or Windows Server 2008. Tasks take about 20 minutes. Users will probably want to configure several configurations: for example, daily, weekly, and monthly cycles. Using a task scheduler is not an option.

The user will schedule repetitions through an interface similar to the Outlook meeting dialog box. Once they set up the schedule, they started it, and it should sit in the system tray and run its tasks at the appointed time, and then send mail to indicate that it has ended.

What is the best way to write this so that it does not eat resources, block the host, or behave badly?

+3
source share
2 answers

The best you can do is not reinvent the wheel using what the OS provides. See the article Calling the Task Scheduler in Windows Vista (and Windows Server 2008) from managed code from Bart De Smet for very accurate use of the Windows Task Scheduler from C #.

- (, ), Cron .NET . Cron #, , , . Cron () #, , . , , , -, Cron, .

+4

Windows, SQlite db , , db,

System.Timers.Timer 

System.Windows.Forms.Timer

Windows

+1

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


All Articles