Hi all,
Server - Windows server 2012 R2 We are having an issue where we are able to run the epmautomate batch script from the command prompt fine, but not from the Windows scheduler. It errors out with error code 7 and fails when it tries to log in to a URL with user name and password. We tried both with hard-coding username and password and passing them as argument. But it fails in both the way in the scheduler but works when run directly in command prompt.
The script is :
@echo on
set batchlog= D:\HPL_Project\Logs\Batch_Automate.txt
REM set UName=%1
REM set Pwd=%2
call epmautomate login username password https://url.oraclecloud.com domain
if %errorlevel% == 0 (
echo "Login Successful" %date% %time% >> %batchlog%
) else (
echo "Login Not successful" %date% %time% >> %batchlog%
exit;
)
call epmautomate runplantypemap MapName clearData=true
if %errorlevel% == 0 (
echo "Data Map ran successfully" >> %batchlog%
echo "Data Maps "Data Push" have run successfully") else (
echo "Data Map not ran successfully" >> %batchlog%
exit;
)
echo "File executed till the end"
One thing is that the user used to run the batch is not an admin user, but it is able to create the batch jobs.
Can anyone help what can be the issue, why we are able to run the jobs directly but not from the Windows scheduler? It fails in the below statement : call epmautomate login username password https://url.oraclecloud.com domain displaying 'Log in not successful' in the script log. Error code is 7 from the scheduler operational log. Has anyone seen similar issues? TIA.