How can I schedule tasks in a WinForms app?
Posted
by Greg
on Stack Overflow
See other posts from Stack Overflow
or by Greg
Published on 2010-03-22T04:15:36Z
Indexed on
2010/03/22
4:21 UTC
Read the original article
Hit count: 472
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
© Stack Overflow or respective owner