SQL 2008 Job Agent running a C# Console Application

I have a C# console application that I need to run on a scheduled basis. The app also have a number of paramters (ie Start Date, End Date, 'Summary' or 'Detail') etc.

I can run the app from the cmd prompt no problem.

However, when I try to add this as a scheduled job, it fails.

First it gave me security issues, so I created a credential and proxy, but now it just hangs/runs without ending...

Can anyone confirm that console apps can run as SQL jobs?
If not, what options would you suggest?
If this should work, can anyone offer some suggestions on how to configure this?

I was trying to test so other apps, but they seem to have similar results.

Thanks in advance.
LVL 2
alkabelloAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Guy Hengel [angelIII / a3]Billing EngineerCommented:
>Can anyone confirm that console apps can run as SQL jobs?
yes, that works in general

>If this should work, can anyone offer some suggestions on how to configure this?
usually this problem occurs because the sql agent service does not have the access to some resource used in the script.
so, what service is the sql agent service running under?
and what resources are accessed by the c# console app?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
alkabelloAuthor Commented:
This seems very odd, but I set the SQL agent service back to using local Network Services, and the job runs (and the credentials and proxy seem to work).

if I set the service to use a user account that has access to both the network and SQL resources, I was getting an error message in the SQL job history that the credential user login failed...

So, after a bit of conflicting info, it seems to work.  I'm just not completely clear why.

Thanks
0
alkabelloAuthor Commented:
These questions helped to resolution the issue.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2008

From novice to tech pro — start learning today.