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

New Post: Set ExecutionTimeLimit to TimeSpan.Zero doesn't work

$
0
0
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:
   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!!

Viewing all articles
Browse latest Browse all 2206

Latest Images

Trending Articles



Latest Images

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