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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

C# and Windows Task Scheduler

Status
Not open for further replies.

Dodecahedron

Technical User
Oct 27, 2005
69
GB
I have a C# code which I have scheduled to run once a day. This works when I run it when I am there or schedule it when I am logged on. However if I schedule it to run at 6am, when I am not at work it doesnt work.

Does anybody know why?
 
Does your program access a resource on a different PC? Scheduled tasks run under the local system account when no one is logged on and cannot access network resources.

Try going into the properties of the task and set a user account for it to run as that has permissions to the network resources your program needs.

_____
Jeff
[small][purple]It's never too early to begin preparing for [/purple]International Talk Like a Pirate Day
"The software I buy sucks, The software I write sucks. It's time to give up and have a beer..." - Me[/small]
 
What did you use to schedule it to run?

Because the Windows Scheduler (aka the AT.exe command) can be set to run as another user, and doesn't depend on someone being logged in to run.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top