0
votes

I have a C# console application that creates large zip file and uploads to SFTP. I used windows Task Schedule on VM to execute this task every night. (VM runs 24/7/365). Application itself sends an error email if anything happens while the application is running.

However, I did run into an issue with Task Scheduler. The Task Scheduler status for that particular task would be Running yet I DO NOT SEE the console application window at all! Is there a way I can get notified if the task fails to execute my application?

Or can I write a different program in c# that checks the execution of the task?

Any help or suggestion would be appreciate. If there's already such a program I'm willing to give it a try or another approach to this... I want to be 100% sure that my .exe executed at specified time.

1

1 Answers

1
votes

Firstly, tasks dont(shouldnt) run interactively. If you set them to, they will only run interactively if the user that is set as the security principal is logged in. (Sys admin days are a bit fuzzy to me so I hope thats accurate)

That being said, you can configure error handling in the task itself. As well as configure the task to run at startup if it fails to run previously.

See here