This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

My question is: Why does 1-monday.bat run perfectly by clipping a shortcut and produce a 410 error when Windows runs it in the task scheduler?

Hello. The file 1-lunes.bat contains the instructions to make a backup and run a program as shown below:

CD D:\catalina-gas\inventar

runcobol.exe averaver.cob c=windows.cfg L=WOWRT.DLL

CD D:\catalina-gas\creditos

runcobol.exe solito.cob c=windows.cfg L=WOWRT.DLL

CD D:\catalina-gas\pagar

runcobol.exe solito.cob c=windows.cfg L=WOWRT.DLL

RMDIR /S  /Q f:\backup\catalina-gas\lunes

XCOPY /E /I /Y D:\catalina-gas f:\backup\catalina-gas\lunes

 

1-monday.bat runs perfectly when it receives a direct clip to the shortcut on the Desktop but if it is placed as a Windows task in task scheduler program script D:\catalina-gas\backup\1-monday.bat the program AVERAVER.COB produces an error: Cobol configuration 410 error processing configuration

 

My question is: Why does 1-monday.bat run perfectly by clipping a shortcut and produce a 410 error when Windows runs it in the task scheduler?

Parents
  • Suggested Answer

    What directory contains windows.cfg?  

    My guess is that in your desktop shortcut, somehow the RUNCOBOL environment variable contains the directory in which windows.cfg is located. 

    Perhaps the task scheduler is running as a different user, and the RUNCOBOL environment variable is not initialized to the expected value(s).

Reply
  • Suggested Answer

    What directory contains windows.cfg?  

    My guess is that in your desktop shortcut, somehow the RUNCOBOL environment variable contains the directory in which windows.cfg is located. 

    Perhaps the task scheduler is running as a different user, and the RUNCOBOL environment variable is not initialized to the expected value(s).

Children