I wrote the following code
TaskService taskService =newTaskService();
TaskDefinitiontaskDefinition = taskService.NewTask();
taskDefinition.Actions.Add(newExecAction("program.exe",null,null
taskDefinition.Principal.LogonType =TaskLogonType.S4U;
string userId =WindowsIdentity.GetCurrent().Name;
userId = userId.Substring(userId.LastIndexOf(
'\\')+ 1);
taskDefinition.Triggers.Add(new
TimeTrigger(scheduledtime));
// Register the task
taskService.RootFolder.RegisterTaskDefinition("Execute exe", taskDefinition, TaskCreation.CreateOrUpdate, userId, null, taskDefinition.Principal.LogonType);
when i schedule task in task schedular only once it will run fine but when i run task schedular to excecute program.exe to run multiple times at same Time i am getting 0xff Error how to resolve it.can any one please help me out.