Write your code as a standalone console application, and then configure a scheduled task on the server to run the application at this time every day.
If you want the task to run more than once a day, you will have to set up a scheduled task for each time.
To configure a scheduled task, go to Control Panel> Scheduled Tasks , and then click "Add Scheduled Task". This opens a wizard that guides you through the process:
- Choose your application
- Give the task a name and select a frequency - you need Daily.
- Set a time and whether you want this task every day, on weekdays or every day. Also when you want to run a task.
- Enter the credentials of the user account to run the application. It would be better to set up a separate account for this.
Then you are done.
You can configure the settings after setting it up.
Chrisf
source share