0

I really need help getting a .bat file to run from the Task Scheduler.

  • It runs when ran from location manually or when Run is clicked from Task Scheduler.
  • It doesn't run on a schedule when Run only when user is logged on / Run when user is logged on or not
  • The user is my local account is also the admin
  • The .bat file is stored in C:\Users\user1\eclipse-workspace\abc\, and this is what I have filled in for the Program/Script under Settings in Actions tab.
  • I have unchecked all options under the Conditions tab, (tried checking the power options, still didn't work).

I'd would prefer to have the option set: Run when user is logged on or not.

Question: Is there something I'm missing or that I have setup or configured wrong that is causing this script to not run on the scheduled task?


The .bat file code

cd C:\Users\user1\eclipse-workspace\abc
set ProjectPath=C:\Users\user1\eclipse-workspace\abc
echo %ProjectPath%
set classpath=%ProjectPath%\bin;%ProjectPath%\Lib\*
echo %classpath%
java org.testng.TestNG %ProjectPath%\testng.xml
pause
Gina Gina
  • 101

0 Answers0