MSFN Forum: Issue in Batch File which has multiple calls - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Issue in Batch File which has multiple calls Rate Topic: -----

#1 User is offline   idealone 

  • Group: Members
  • Posts: 6
  • Joined: 05-February 08

Posted 05 February 2008 - 06:46 AM

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



#2 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,117
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 05 February 2008 - 08:20 AM

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

Quote

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"


#3 User is offline   idealone 

  • Group: Members
  • Posts: 6
  • Joined: 05-February 08

Posted 06 February 2008 - 12:02 AM

Thanks Yzöwl, Great!! its working
Starting with the /B switch is working fine :).

cheers

#4 User is offline   idealone 

  • Group: Members
  • Posts: 6
  • Joined: 05-February 08

Posted 06 February 2008 - 04:49 AM

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

#5 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,117
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 06 February 2008 - 07:36 AM

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" 


Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy