I have a Scheduled Task running on a Windows 2008 R2 server.
The task calls a .bat file that performs a file copy.
Everything works perfectly except for one thing. I want the task to terminate if it takes longer than a certain period of time. When I enable 'Stop the task if it runs longer than:' (in the Settings tab) and enter a time limit, this just gets ignored. To test whether the stop works, I have added a delay in the batch file to cause it to sleep for a while.
The task is configured to run as a local user (not the administrator) and as mentioned earlier, everything works perfectly except for the termination of the job if it takes too long to run.
Any help would be hugely appreciated!