Batch File not running in the AM hours
Posted: 12 May 2021 15:29
Hi All,
I have an occurring issue. I have setup task scheduler to run a batch file at 12am and every hour after that.
I have setup the task to run as SYSTEM, Highest Privilege, run whether logged on or off and the Batch file does not run from 12am-10am. It's recurring behavior, it never runs from midnight to 10am. However at 11am it will run, and continue running every hour until 11PM. The computer does not go to sleep, played with all the options in task scheduler to wake it up if it needs too. However issue still occurs. I have tried running it as my local admin account and still not working.
At this point, I believe it's an issue with the code in the batch script because I have even gone as far as creating the batch file to an exe file.
The batch file is loading jmeter, utility to load test sites. Is there any thing in the code that prevents it from running at certain times of the day. Can you please help me out or point me in the right direction?
I believe it has to be a code issue because , when I test for example to open a notepad at 12am and every hour after it, it does it.
"C:\Program Files\apache-jmeter-5.3\bin\jmeter" -n -t C:\AA\Per\JMX\mytest.jmx -l C:\AA\Per\Reports\%name%\Report-%date:~10,4%-%date:~7,2%-%time:%time:~6,2%.jtl -e -o C:\AA\Per\Reports\%name%\MLReports\%date:~10,4%-%date:~4,2%-%date:~7,2%_%time:~0,2%-%time:~3,2%-%time:~6,2%
I have an occurring issue. I have setup task scheduler to run a batch file at 12am and every hour after that.
I have setup the task to run as SYSTEM, Highest Privilege, run whether logged on or off and the Batch file does not run from 12am-10am. It's recurring behavior, it never runs from midnight to 10am. However at 11am it will run, and continue running every hour until 11PM. The computer does not go to sleep, played with all the options in task scheduler to wake it up if it needs too. However issue still occurs. I have tried running it as my local admin account and still not working.
At this point, I believe it's an issue with the code in the batch script because I have even gone as far as creating the batch file to an exe file.
The batch file is loading jmeter, utility to load test sites. Is there any thing in the code that prevents it from running at certain times of the day. Can you please help me out or point me in the right direction?
I believe it has to be a code issue because , when I test for example to open a notepad at 12am and every hour after it, it does it.
Code: Select all
@ECHO OFF
setlocal EnableExtensions DisableDelayedExpansion
set name=%DATE:~4%-%DATE:~-7,2%-%DATE:~-10,2%
echo %name%
IF NOT EXIST C:\AA\Per\Reports\%name% (
echo "create new"
mkdir C:\AA\Per\Reports\%name%
mkdir C:\AA\Per\Reports\%name%\MLReports
)