I added a simple exe to scheduled tasks through C# site. The site is hosted on IIS7 (the exe just shows a message box). This was the command that I run on the C# code:
schtasks /create /tn mylbat /tr "the exe path" /ru myuser /rp mypassw /sc daily /st 16:03
I can see the task added too. But it doesn't get executed and running schtasks /query /tn mylbat
through the command line throws "Could Not Start" as status.
I can see the trigger and action set properly in the task scheduler.
I believe adding the task is working fine since it adds the proper attributes.
Where have I gone wrong?