I have to develop an application using C#.net that has to be run once a day. It only runs for at most one minute, so developing a Windows service is overkill and a scheduled task is the appropriate way.
However, I have a few questions about how the application can communicate its results:
- How do I indicate to the task scheduler that the task has failed? Is this via the program's exit code?
- How do I log output information? Is console output automatically captured or do I have to write to the event viewer explicitly?