문제

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?

도움이 되었습니까?

해결책

I googled a lot about it. The procedures to add a task in the scheduler was perfect but the problem was that that if the service or task that we are trying to schedule needs some interaction, the task wont start. The task has to be one that has no user interaction.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top