Search code examples
batch-fileinfluxdbgrafana

Unable to launch multiple programs via a batch file


Am trying to create a batch file, that would launch multiple programs. But unfortunately, things don't seem to work.

Kindly, find below my requirement:

  1. Open InfluxDB server
  2. Launch Grafana application.

Commands used in the batch:

@echo off
cd "C:\Users\C51539A\Downloads\influxdb-1.5.2-1"
Start.cmd
timeout 5
cd "C:\Users\C51539A\Downloads\grafana-5.1.3\bin"
grafana-server.exe

The above script, launches InfluxDB. But doesn't moves further.

Could you please suggest me, on how to proceed?


Solution

  • @echo off
    cd "C:\Users\C51539A\Downloads\influxdb-1.5.2-1"
    start InfluxDB
    ping -n 6 127.0.0.1 > nul
    cd "C:\Users\C51539A\Downloads\grafana-5.1.3\bin"
    start grafana-server
    

    Edit the "start InfluxDB" and "start grafana-server" to be the correct exe names, without .exe