Instead of calling a BAT file from Aware, I used EXECUTE PROGRAM to start a Powershell script.
I let it call the exact BAT file that was crapping out from AIM.
Same result.
(remember, if I manually run the BAT file it works fine)
Solved it by having the commands in the OP put into a PS1 script (with a few mods for PS syntax).
Got rid of the top level BAT file.
Inside, it still executes the same 2 BAT files as before.
All runs fine.
Scheduler rule:
IF DOMAIN()<>'CGDEMO' AND TESTING_MODE() = 'No' AND (CURRENT_TIME='22:50' AND CURRENT_DATE>=01/01/2005) then
Nightly_Process_Tenants
EXECUTE PROGRAM 'powershell -File C:\DREFiles\PS_StartNightly.ps1'
NOTE: FYI
-- nightly process starts
Aware runs thru Tenants, creating lines in a tmp database table.
An Aware Export sends those lines to a physical file... named "nightly.bat"
A prep.bat routine formats the files, removing quotes, commas, the 1st line inserted by the Export command
(each line is a curl.exe command to retrieve data)
Then, that file is executed, bringing lots of curl.exe results into a dir
After all that data is retrieved, a Powershell script starts:
Loops thru each file found
.Scrubs raw HTML into an importable format
.Imports it into a SQL table
Executes a MS SQL Stored Procedure to load/merge new data into Aware tables
-- nightly process finished