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).

  • Volume in drive D is Misprogramas

     Volume Serial Number is 80F4-A930

     

     Directory of D:\catalina-gas\backup

     

    [.]                 [..]                1-lunes.bat         2-martes.bat

    3-miercoles.bat     4-jueves.bat        5-viernes.bat       6-sabado.bat

    7-domingo.bat       Backup-Diario.lnk   BACKUPWG.COB        BACKUPWG.wow

    confirmar_0.bmp     domingo_0.bmp       folder.doc          jueves_0.bmp

    logfont.cpy         lunes_0.bmp         martes_0.bmp        miercoles_0.bmp

    regresar_0.bmp      sabado_0.bmp        viernes_0.bmp       windows.CFG

    windows.cpy        

Reply
  • Volume in drive D is Misprogramas

     Volume Serial Number is 80F4-A930

     

     Directory of D:\catalina-gas\backup

     

    [.]                 [..]                1-lunes.bat         2-martes.bat

    3-miercoles.bat     4-jueves.bat        5-viernes.bat       6-sabado.bat

    7-domingo.bat       Backup-Diario.lnk   BACKUPWG.COB        BACKUPWG.wow

    confirmar_0.bmp     domingo_0.bmp       folder.doc          jueves_0.bmp

    logfont.cpy         lunes_0.bmp         martes_0.bmp        miercoles_0.bmp

    regresar_0.bmp      sabado_0.bmp        viernes_0.bmp       windows.CFG

    windows.cpy        

Children
No Data