I have a C# console program that generates Excel files and writes extracted data from SQL tables into them. Program is scheduled by Windows Scheduler to run periodically. Problem is that when scheduler fires up the program, it goes through the steps and logs that completes successfully. However, no file is generated and no error is logged. If I run it from command window, it works perfect.

I'm stuck. Any help is appreciated.

Fred

Try and setup a batch file to call the *exe passing any args to it and set it in the scheduler and see if it runs. I have had issues in the past and that seemed to resolve it. Also you can log the batch file output. Be sure to also make sure it's not a permissions issue... Do you have anything logging to the Application event logs? Have you checked the event logs to see if there are any issues/results showing up? What is the result under the task scheduler (0x0)?

HTH's

Try and setup a batch file to call the *exe passing any args to it and set it in the scheduler and see if it runs. I have had issues in the past and that seemed to resolve it. Also you can log the batch file output. Be sure to also make sure it's not a permissions issue... Do you have anything logging to the Application event logs? Have you checked the event logs to see if there are any issues/results showing up? What is the result under the task scheduler (0x0)?

HTH's

I've already done that with no luck.

Thanks,
Fred

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.