-1

I'm using Windows Server 2008 R2.

I've created a .NET console application and deployed it to the server. If I double click the .exe application, it runs well and does it's job.

This application has to update values on a database. I need to be able to run this every hour automatically.

How can I achieve this?

Only Bolivian Here
  • 147
  • 1
  • 3
  • 8
  • Look at the acepted answer here: http://stackoverflow.com/questions/3243348/how-to-call-a-method-daily-at-specific-time-in-c This includes also the option to run it programmatically in .net – Mr.T Jul 04 '12 at 15:42

3 Answers3

4

The windows task scheduler allows you to regularly run a program. It's in the control panel under administrative tools, or in server manager under configuration.

Just click create task, add a trigger for "On a schedule" and in advanced settings choose "Repeat task every 1 hour for a duration of Indefinitely"

Under actions, add one for start a program and specify your program and any needed arguments

On the first tab, you will probably want to choose "Run whether user is logged on or not" and choose a user to run it as.

Grant
  • 17,671
  • 14
  • 69
  • 101
2

You should use Windows Task Scheduler for that. You can check this tutorial to get started.

dkaragasidis
  • 745
  • 4
  • 11
2

Use Task Scheduler. It's pretty straightforward.

ThatGraemeGuy
  • 15,314
  • 12
  • 51
  • 78