weirdgyn
weirdgyn

Reputation: 926

Scheduling console application

I wrote a .NET console application that needs to be scheduled trough Windows scheduler. Such console performs some network and database activities and write a logfile. The application work if run on Desktop/Command prompt but if I try to run it trough the scheduler it refuse to start. Another issue I faced is the write access to the app folder. Even if I set permissions to the folder containing application binaries to be wrote by 'Everyone' the app seems unable to create the log file and/or append data to it. The problem fixes if I run the application with Administrator priviledges (on desktop) but if I define the Activity in the scheduler to Run with higher privildegs this will not fix it anyway.

Upvotes: 0

Views: 733

Answers (2)

weirdgyn
weirdgyn

Reputation: 926

I found the issue... http://support.microsoft.com/kb/2452723 It seems that the "Start In" parameter of the Action should not contain quotes. Of course the folder should be 'writetable' for the user assigned to the task.

Upvotes: 1

apexlol
apexlol

Reputation: 130

Best course of action is to create a Service account with admin privileges and schedule the task under such account and select the option to run whether the user is logged on or off. This approach is even more relevant where Active Directory is in place.

Hope this helps, Apex

Upvotes: 1

Related Questions