dahall / TaskScheduler

Provides a .NET wrapper for the Windows Task Scheduler. It aggregates the multiple versions, provides an editor and allows for localization.
MIT License
1.21k stars 191 forks source link

cannot find task iis, asp.net #858

Closed focusede closed 3 years ago

focusede commented 3 years ago

Hi, first off thank you for this wrapper. It seems to do exactly what I need, which is missing in my life.

On a Win2016 server, I have manually created a task which runs an exe. I am hoping just to trigger that task from my asp.net application.

using (var ts = new TaskService()) { // This will find it even if its down in a folder. var t = ts.FindTask(sTaskName); if (t != null) { t.Run(); {

So what is happening is t is always null. I have searched but am hoping you can point me to the right way to execute this task. On a local machine (win10) I was able to run my simple task. Is there a step by step guide somewhere describing what must be done for the task to be found and run?

dahall commented 3 years ago

Duplicate of #859