VI Import chain via batch file launched by windows task scheduler.

We have a long time customer that has been running a batch file that launches a VI job.  The first job chains to another and so on for several jobs.  They are and have been Sage 100 premium, we just upgraded them to 2020. The batch file works and all the jobs run when executed manually.  When it runs in Windows Task Scheduler, only the first job runs.  The second job does not run and is not frozen, it appears that it never gets initiated.

Has anyone seen anything like this?  Thanks in advance!

  • I've taken a different approach to chaining VI jobs, which allows chaining different types of things in an all-in-one batch process.

    SET WaitFile=\\Server\Share\Folder\ProcessName_Wait.txt
    
    rem *********************************************************************
    rem Remove the WaitFile
    IF EXIST %WaitFile% del %WaitFile%
    
    rem *********************************************************************
    rem Now trigger the VI job, with the WaitFile being created by Perform logic on completion of the import
    
    C:
    cd "C:\Sage\Sage 100 Workstation\MAS90\Home\"
    pvxwin32.exe -hd ..\LAUNCHER\SOTA.ini ...blah blah blah
    
    rem *********************************************************************
    rem Now wait for the WaitFile to be created.
    
    :CheckForFile1
    IF EXIST %WaitFile% GOTO FoundIt1
    REM If we get here, the file is not found, so wait 30 seconds and then recheck.
    TIMEOUT /T 30 >nul
    GOTO CheckForFile1
    :FoundIt1
    
    rem on to the next step...

    The perform logic is just triggering a batch file to create a blank txt file in the right place.

  • Thanks  and !  I looked over that topic Big Louie and I've got it working split up similar to what you suggested Kevin.  It's just that it worked so well for so long, I thought maybe there was a change that someone might be aware of.