File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes General Computing and the fly likes Batch file to exit if server is not started Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "Batch file to exit if server is not started" Watch "Batch file to exit if server is not started" New topic

Batch file to exit if server is not started

sarvan kumar
Ranch Hand

Joined: Jul 28, 2010
Posts: 66
I dont know whether it is right place to ask

I need a batch file script for taking backup and that is sheduled for every day evening for taking backup

The condition is if the server is started it should stop the server and copy the location of a file in backup folder and if server is not started it should not run the batch file if should come out

can you give the script for this batch file.

Peter Johnson

Joined: May 14, 2008
Posts: 5852

First, this has nothing to do with JBoss, so I am moving it to the general topics forum.

Second, I hope that the word 'batch' implies you are running on Windows, otherwise I should have moved this thread to the Linux forum.

Third, I hope that by 'server' you mean a physical machine (or even a VM), and not 'application server', in which case you might have meant JBoss AS and I should have left the post here.

Fourth, we don't write batch files for you. You need to try some things and then post the batch file that you have, tell us where you are having problems, and then we will help. See: NotACodeMill

JBoss In Action
I agree. Here's the link:
subject: Batch file to exit if server is not started
It's not a secret anymore!