Batch file stops processing after hcicmd command

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Batch file stops processing after hcicmd command

  • Creator
    Topic
  • #55554
    Connor Armstrong
    Participant

      We’re upgrading to Cloverleaf 6.2.0.2 on new Windows Server 2016 hardware.  While testing our batch jobs, they run successfully but they stop after processing an hcicmd command to start or stop a thread.  The premise of the job (attached) is to stop a thread, copy and rename an output file, restart the thread, then copy the renamed file to a network share.

      When the job runs, none of the commands after an hcicmd are run, the script just stops but the hcicmd command does run successfully to stop the thread.

      Sample script:

      call setroot   <- runs echo “stopping thread”  <- runs hcicmd -p milbadt -c “smsadtbadt pstop”  <- runs, thread is stopped sleep 180 <- does not run as job doesn't run for 3 minutes echo “set date and time”  <- does not run copy filename1 filename2  <- does not run hcicmd -p milbadt – c “smsadtbadt pstart” <- does not run If we comment out the first hcicmd, the commands after it run successfully, until it reaches another hcicmd command that isn’t commented out.  That runs but then nothing after it runs. I’ve tried using the -v flag and the output to our log file is the same as on our Windows 2008 R2 server with Cloverleaf 6.0.1.0.  There aren’t any errors and the job shows as successful in Task Scheduler. Is anyone else using the hcicmd command to stop threads via a batch job on Cloverleaf 6.2 on Windows 2016?  At this point I’m not sure if it’s Cloverleaf or Windows. Connor

    Viewing 0 reply threads
    • Author
      Replies
      • #85730
        Connor Armstrong
        Participant

          I knew just after posting this we’d figure it out.  Putting a call before the hcicmd command resolved the issue.

          call hcicmd -p myprocess -c “mythread pstart”

          Now, it doesn’t explain why it’s working on Windows Server 2008 R2 without the call but it must be a change with the shell or an OS variable that allowed the batch file to call another batch file and return to the original one.

          Connor

      Viewing 0 reply threads
      • The forum ‘Cloverleaf’ is closed to new topics and replies.