Thanks Mic. Can you explain this piece of code you're using:
2>&1 |find /i "INFO: No tasks">nul || (
">2&1" sends the STDERR stream to the same place that STDOUT is going.
In the above they will both be piped to FIND.
"||" and "&&" evaluate the errorlevel of the previous command and execute
the following commands. || executes on errorlevel 1 or higher and &&
executes on errorlevel 0.
In the above if the string is not found it will branch to the :loop label.
Or it should - I didn't test it.