title: Windows Task Scheduler stops tasks when it's been running for X days
body: <p>I am creating a scheduled task from command line:</p>
  
  <pre><code>schtasks /Create /SC ONSTART /TN "Zookeeper server" /TR D:\Zookeeper\zookeeper-3.4.6\bin\zkServer.cmd /RU System /V1 /f
  </code></pre>
  
  <p>The issue is that the "Stop task if running for X days" options is always checked. I tried unchecking it, but it always comes back on right away. Since it's a server, I want it to be able to run for more than 3 days.</p>
  
  <p>I saw a solution where you had to export the xml of the task, change the value manually (ExecutionTimeLimit), delete the task and create it from the xml template, but that doesn't work either.</p>
  
  <p>I also thought that it was a mandatory option for a ONSTART trigger, so I tried to replace it with a one time only trigger, the same thing happens.</p>
  
  <p>Is there a way to make sure my app is run on startup (without a user logged in)? Still allowing the user to stop and start it as he pleases.</p>
  
  <p>I know about services, but I heard it was kind of hard to make a service from an app with java.</p>
  
  <p><strong>EDIT</strong>: I would prefer to fix that issue, but if that's not possible, a way to install Zookeeper Server as a service. I tried with nssm 2.23, but there is no way to install a service silently (it must be done without user interface).</p>