Reputation: 3978
I'm looking for a way to make a program that runs itself (or a method) every X time (days, weeks, whatever). Basically, I want my program to do what the Windows Task Scheduler could do. The reason I don't use the Task Scheduler is because I plan to deploy this application on a server which I have no remote access to, but need to re-generate some files every given time.
Suggestions?
Upvotes: 1
Views: 803
Reputation: 13549
Create a Windows Service and use a timer. You can pick between System.Timers.Timer and System.Threading.Timer based on the differences you can find here:
Upvotes: 1