0

I want to create a batch file to start MySQL server (mysqld) and Rails Thin server (rails s thin). But only MySQL starts, rails s thin doesn't:

@ECHO OFF
cd C:\path\to\app
CMD /C "mysqld --console"
REM exit  <-- with or without it
REM cd C:\path\to\app  <-- with or without it
CMD /C "rails s thin"

I also tried to create three files for this. The main one runs other two. Doesn't help either, only MySQL runs. And I need to start MySQL before Rails. Rails needs running MySQL. How to write such a batch?

UPD: How to start 2 programs simultaniously in windows command prompt

Community
  • 1
  • 1
Green
  • 28,742
  • 61
  • 158
  • 247

1 Answers1

1

use start

e.g.

start notepad.exe

start calc.exe

if you want to run one after another with some tests, you may need to write your own program.

Chengxi Li
  • 454
  • 1
  • 3
  • 14
  • Yes, you're right. I'm trying it out now and it is working :) Now experimenting with options that may be passed to `start` command. Thank you. – Green Apr 18 '13 at 18:17