I use the batch script to create a scheduled task:
schtasks /Create /F /RL highest /SC onlogon /TR "C:\MyFile.exe" /TN "MyDescription"
It perfectly runs my application on every user logon. However, it automatically enables "Stop the task if it runs longer than" option with "3 days". I think it is default behavior.
My application may run on servers and it should not quit after 3 days. How can I modify the batch script so that my application runs infinitely?
/XML
option, however, you can place<ExecutionTimeLimit>PT0S</ExecutionTimeLimit>
in the Settings – Barometry