Hi,
I'm developing a web control which schedules Execute or ExecuteScript tasks. I was trying to create a new task without using JobClass.AddTask() but it seems that causes problems in the windows client. So now I'm initially adding it as TaskClass.TaskT.Execute (or if the control is in edit mode, it uses the existing task whatever type that may be) but then calling a configure method which changes the type depending on the commandline that is entered.
Is the following way a proper way to change a task type or will the task still retain the settings belonging to the old type (e.g. changing an Execute Task to ExecuteScript Task) and can that somehow cause problems?
task.TaskType = TaskClass.TaskT.ExecuteScript;
if (task.ExecuteScript == null)
task.ExecuteScript = new TaskExecuteScriptClass();
task.ExecuteScript.FilePath = taskSettings.CommandLine;
Thanks,
Patrick