Author Topic: Trigger two different batch files  (Read 123 times)

wnhnlpfm

  • Newbie
  • *
  • Posts: 1
Trigger two different batch files
« on: June 18, 2019, 09:08:46 pm »
We have under Open/Play 1, File 1,  a 'restart' batch file to 1. Play a station ID and 2. Attempt to reconnect to the STL stream. This setup works, when I test it by temporarily disconnecting the network.

I tried moving the 'restart' batch file to the File 2 position on the Open/Play 1 tab, and inserting another batch file in File 1, to do a 10 second ping test and save the result to a text file, hoping to gather some diagnostic data.

Open/Play 1
File 1: C:\...\pingtest.bat
File 2: C:\...\restart.stream.bat

When I test this setup, the 'restart' batch file runs, but the ping test does not, or at least I don't see that it has written to the output text file. Would it be writing to some other directory than the one where the batch file is located?

The ping test batch file works fine when it is run from the command line.

What am I doing wrong?

thanks very much.....

Jan

  • Hero Member
  • *****
  • Posts: 534
Re: Trigger two different batch files
« Reply #1 on: June 18, 2019, 09:49:03 pm »
Maybe the reason is that the silence detector does not wait for the batch file to terminate and continues immediately in processing other lines.

A solution may be to use the Delay option.

Anyway it seems to be a good idea for next version to change the execution mode especially for the *.bat files to wait until the batch terminates, or make this user selectable.