I'm using the TaskScheduler.dll (version 2.5.21) in order to create a new task.
I want my task to run indefinitely, for that I'm setting the ExecutionTimeLimit property to TimeSpan.Zero.
When I execute my code in windows10 It works perfectly but in windows7 it doesn't work: "Stop the task if runs longer than" is checked and the value is 3 days....
Here is the code where I set all taslSettings:
Thanks!!
I want my task to run indefinitely, for that I'm setting the ExecutionTimeLimit property to TimeSpan.Zero.
When I execute my code in windows10 It works perfectly but in windows7 it doesn't work: "Stop the task if runs longer than" is checked and the value is 3 days....
Here is the code where I set all taslSettings:
settings.AllowHardTerminate = true;
settings.DisallowStartIfOnBatteries = false;
settings.Enabled = true;
settings.IdleSettings.RestartOnIdle = false;
settings.IdleSettings.StopOnIdleEnd = false;
settings.MultipleInstances = TaskInstancesPolicy.IgnoreNew;
settings.RunOnlyIfIdle = false;
settings.StopIfGoingOnBatteries = false;
settings.ExecutionTimeLimit = TimeSpan.Zero;
settings.Compatibility = TaskCompatibility.V1;
Is there a known issue for that? How could I manage to solve my problem?Thanks!!