This project has moved and is read-only. For the latest updates, please go here.

Immediately Running a Task via Task.Run(params String[] parameters)

Sep 23, 2010 at 2:59 AM

The Task.Run function don't seems to work.

When i go to the GUI of the Task Scheduler and click "Run" in the filemenu the task runs as intended but if i call the Run funktion on the task nothing happens.

TaskService ts = new TaskService();
TaskFolder tf = ts.GetFolder("MyTaskFolder");
Task t = tf.Tasks["MyTaskName"];
t.Run(new String[] { });

What am I doing wrong?

Anyone who can suggest anything?

Regards Flo

Sep 28, 2010 at 9:32 PM

First of all, try replacing the last line with just t.Run(). If that doesn't work, then you may want to see if the task is disabled (under v2) or if the task is not set to run interactively it may be actually be running but in a different user session.

Sep 28, 2010 at 10:56 PM

Thanks for the help I just tried it again before applying the changes you suggested, and it seems it has evolved^^

It runs perfectly now after lettig it sit for a view days.

Anyway best regards. I enjoy the Wrapper very much.