How can I schedule tasks in a WinForms app?
- by Greg
QUESTION: How can I schedule tasks in a WinForms app? That is either (a) what is the best approach / .NET classes/methods to use of (b) if there is an open source component that does this well which one would be recommended.
BACKGROUND:
Winforms app (.NET v3.5, C#, VS2008)
I'm assuming I will run the winforms application always, and just minimise to the system tray when not in use
Want a simple approach (didn't want to get into separate service running that UI winforms app talks to etc)
Want to be able to let the user select how often to schedule the sync (e.g. hourly, daily - pick time, etc)
Ability to at the times when the scheduler fires to run a chunk of code (assume it could be wrapped as a backgroundworker task for example)
The application is always running & appears in the system tray