Jump to content

Issue in Batch File which has multiple calls


Recommended Posts

Hi All,

I have an issue running a batch file which has the following code:

@echo off

java -jar D:/ruby/lib/ruby/gems/1.8/gems/Selenium-1.0.2/lib/selenium/openqa/selenium-server.jar.txt

ruby "D:\Programs\Cvis\SmokeTEST1.rb"

The First line starts a server which has to be active and then go to the second line which starts my program.

Is there anyway i can run my server in the background and goto the second line and run my program.

Problem i am facing is that the server starts but it doesn't end so how can second line be executed!!

Thanks in Advance

Link to comment
Share on other sites


did you try the Start command as suggested by Robert Klemme in comp.lang.ruby:

Try using 'cmd /c "start D:\\ruby\\bin\\selenium.cmd"'

If that doesn't do it, (without the double backslashes), my guess is that you may need to use Start with the /B switch

  @echo off
start /b D:\ruby\lib\ruby\gems\1.8\gems\Selenium-1.0.2\lib\selenium\openqa\java -jar selenium-server.jar
ruby "D:\Programs\Cvis\SmokeTEST1.rb"

Link to comment
Share on other sites

Hi,

I wanted to check in my Batch file whether "setup.done" trigger file existed in 'Y' Drive, if it was present i wanted to goto START, which executed my program else it has to come out.

My code is not working, have i done any mistakes?

<CODE>

@echo off

SET trigger_drive=Y:

IF "trigger" == "setup.done" GOTO START

GOTO END

:START

start /b java -jar D:/ruby/lib/ruby/gems/1.8/gems/Selenium-1.0.2/lib/selenium/openqa/selenium-server.jar.txt

ruby "D:\Programs\Cvis_Automation\palm_master_loading.rb"

:END

<CODE>

Thanks in Advance

Link to comment
Share on other sites

You shouldn't need all that, try this:

@Echo off

If Not Exist Y:\SetUp.Done GoTo :Eof

Start /b java -jar D:/ruby/lib/ruby/gems/1.8/gems/Selenium-1.0.2/lib/selenium/openqa/selenium-server.jar.txt

Ruby "D:\Programs\Cvis_Automation\palm_master_loading.rb"

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...