Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scheduling a C# console application

Status
Not open for further replies.

dandot

Programmer
Jul 19, 2005
53
0
0
CA
I've written a C# console application that i would like to have scheduled to run at a certain time on a server machine. How would this be done?
 
you could build a bat script to execute the console app. use windows scheduler to schedule when the bat file executes. since this is a console app a user will need to be logged in for the application to execute.

You may also want to consider building this into a windows service. this is better suited for background work.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Hi,

There is a 'Scheduled Tasks' available in most Windows server versions (start -> control panel -> Scheduled Tasks) - you could add it in here.

Beware (as above) it does need to run under a user account but no-one needs to be logged in.

Windows service is still good advice though!

Hope this helps,

Graeme

"Just beacuse you're paranoid, don't mean they're not after you
 
as for running when not logged in, make sure you dont throw up any messageboxes or anything (like exceptions) that requires user feedback or any type of display. Output your result to a text log or something.
 
I normally don't like to rely on Scheduled Tasks. I usually implement a Windows Service that uses timer threads. For example, I run a service on an hourly basis and in another instance, I have a thread that runs at exactly midnight to run upload data to Oracle.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top