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

LogonTrigger On Windows XP delay not set

Topics: Errors
Apr 28, 2016 at 6:58 PM
Hello I try to create a logonTrigger, in windows 7 work perfect the time delay, but on XP dont set the time delay, any some help?
 using (TaskService ts = new TaskService())
                //new task
                TaskDefinition td = ts.NewTask();
                if (ts.HighestSupportedVersion >= new Version(1, 2))
                    td.RegistrationInfo.Date = DateTime.Now;

                td.RegistrationInfo.Description = "Tarea para descarga de marcas de relojes marcadores.";
                td.Principal.LogonType = TaskLogonType.InteractiveToken;
                //logon delay 10minutes
                LogonTrigger lt = (LogonTrigger)td.Triggers.Add(new LogonTrigger() { Delay = TimeSpan.FromMinutes(10) });//15 minutos despues de iniciar la pc
                //daily job
                DailyTrigger dt = (DailyTrigger)td.Triggers.Add(new DailyTrigger(1) { StartBoundary = DateTime.Today + TimeSpan.FromHours(11) });
                //the action
                td.Actions.Add(new ExecAction(Application.ExecutablePath, "service", null));
                //rregister the job
                ts.RootFolder.RegisterTaskDefinition(_taskName, td);
Apr 29, 2016 at 8:22 AM
As I know, the "Delay" property is not support in Task Scheduler 1.0.
And XP use Task Scheduler 1.0, so the "Delay " property not work.
Marked as answer by dahall on 4/29/2016 at 9:51 AM
Apr 29, 2016 at 5:01 PM
bad news :(