Page 1 of 1

Automating starting and stopping subsonic service

PostPosted: Mon Feb 28, 2011 11:00 pm
by dbdog
I'm on an old XP box with too little memory so I'm looking for a way to automatically start and stop subsonic so that it's on while I'm at work and off while I'm home.

Does anyone know what the contents of a batch file should look like to get subsonic to start and stop. I could then run the bat files using scheduler - one to get it to start and one to get it to stop.

Thanks
dbdog

PostPosted: Tue Mar 01, 2011 2:30 pm
by bushman4
Sure...

To start subsonic:

Code: Select all
Net start Subsonic

To stop Subsonic:

Code: Select all
Net Stop Subsonic

Hope this helps,

Glenn

PostPosted: Tue Mar 01, 2011 7:04 pm
by dbdog
Thanks Glenn. Worked like a charm!

PostPosted: Tue Mar 01, 2011 7:08 pm
by bushman4
One thing to be careful about... just because the command returns "The service has been stopped successfully" doesn't mean it has completely stopped. I have found that if you run those commands in quick succession (stop then start) the service gets grumpy and doesn't start correctly, or tries to start but fails because of port conflicts.

So wait a minute in between. Let the service completely stop.

In your situation it is moot because you are starting in the morning and stopping many hours later, and then not starting again until many hours later as well.

Glad I could help,

Glenn