Quantcast
Channel: Task Scheduler Managed Wrapper
Viewing all articles
Browse latest Browse all 2206

New Post: Task schedular OXFF Error

$
0
0

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.

 

 

 

 


Viewing all articles
Browse latest Browse all 2206

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>