TaskDefinition Run whether user is logged on or not C#

patrick

Well-known member
Joined
Dec 5, 2021
Messages
305
Programming Experience
1-3
Hello
Please Help me..

39665519-1ed940a8-506c-11e8-8293-3d324370c581.png



I hope to check [ Run whether user is logged on or not ] from TaskService.

C#:
using (TaskService taskService = new TaskService())
{
    TaskDefinition taskDef = taskService.NewTask();
    taskDef.?????? ;// Run whether user is logged on or not
    //Setting it as Principal.UserId = "SYSTEM" does not work
    taskDefinition.Principal.UserId = "SYSTEM"; //Setting it as SYSTEM does not work
}
 
Last edited:
Back
Top Bottom