Stop Roon Server via Windows command line

Is there a commandline switch I might use to stop roonserver from a script?

I want to stop roon server, sync the database with a backup location (versus time consuming full backup / overwrite) and then start server again at some time in the middle of the night. OS is windows 10, will use this from GoodSync.

On OSX version would be useful too.

On modern Linux it’s easy:

sudo systemctl start/stop roonserver

On OS X, you can create a workflow quickly using Automator.

Haven’t worked with Windows for over 10 years, so I’m afraid I’m not much help there.

Has it occurred to you that you must be blessed.:smiley:

Ignorance is bliss… :wink:

[quote=“Joachim_Herbert, post:1, topic:12615”]
will use this from GoodSync.[/quote]I advise caution using GoodSync as per your other topic Option to exclude subdirectories from library
GoodSync tends to create sync folders within the folders that it is managing.

Carl, thank you for pointing at a potential issue. This scenario fortunately is completely different. Works just fine for that kind of backup job.

The directories GoodSync creates are backups of files replaced and or changed during sync. Roon does not access these files at all, so there is nobody who might get confused :wink:

The feature request concerns directories with music data. roon reads the directories GoodSync uses to keep backups of changed files, entering outdated or deleted files into the database in the process.

[quote=“Joachim_Herbert, post:7, topic:12615”]
Roon does not access these files at all
[/quote]If that’s true, I do not know but it sounds like your confident, then as you say it should be fine.

Back to your question; this worked for Roon, a bit brutal maybe, but you could try it for RoonServer.

C:> taskkill /IM Roon.exe
SUCCESS: Sent termination signal to the process “Roon.exe” with PID 17144.

Thank you Carl. It is gentler than I thought, because it sends a proper WM_CLOSE message to exit the program. But it does not seem to work with roon server. There are 3 processes, RAATServer.exe, RoonAppliance.exe and RoonServer.exe.

All do receive the termination command and close. However they are restarted almost instantly with a different process ID. :frowning:

I want to stop Roon Server on my headless Win10 server so I can back up my Roon database but I can’t figure out how to stop the Roon processes (server, appliance and RAAT). I’ve tried killing them from the command line or via Task Manager but they just restart automatically as soon as I try that. Can anyone point me in the right direction?

If you are remoting into the headless server with GUI, then just right click on the RoonServer notification icon and choose Quit. It will stop all three RoonServer processes. Backup. And then click on RoonServer to start it back up.

I don’t have a Roon server notification icon in the system tray. That was the first thing I looked for when I remoted in.

Very odd. And it’s not revealed when you click the caret to show “hidden icons”?

As shown in the above screen pic. If I right click that icon in the tray it will give me the option to Quit. Are you sure you are running RoonServer or are you running Roon. Roon does not put a tray icon. The two are different install programs.

I am running Roonserver, and I do not have a notification icon. I only have the keyboard icon, audio icon, and “safely remove device” icon in the notification area. I do not even have the caret to show hidden icons.

There is no other way to shut down Roon other than right-clicking this notification icon which I can’t seem to find?

OK, I semi-cheated. I went into Task Manager’s “Startup” tab and temporarily disabled Roonserver from starting, then rebooted. I’ll enable it again after I backup the Roonserver folder.

Thanks for trying to help though…much appreciated.

OK, well that didn’t work. Roonserver is still running, even though it’s been disabled from Startup in Task Manager. WTF.

I figured out why I wasn’t seeing the hidden icon caret, and was able to turn that on, but that only hid one of the icons that was already showing. So then, my issue really is that Roonserver isn’t displaying a notification icon for me.

See this post from Steve (@scolley ) for a batch file in Windows 10 to stop RoonServer, back up the database and restart it.

I don’t know why you are not seeing the RoonServer tray icon.

RoonServer has an associated process that will restart it in the event of a crash, which is why you see it restarting.

That post you linked to essentially talks about issuing the “taskkill” command to stop the roonserver.exe process, but that has the same effect as ending the process in Task Manager…a new process pops up immediately and shows one still running in Task Manager. So “taskkill” isn’t doing the job either (see Joachim_Hebert’s post above which talked about this).

Can I kill that restart process somehow to prevent it from starting up a new server process? What’s it called?

This post from @danny sets out how RoonServer and RoonAppliance interact. Danny will see that flag and may be able to clarify how to use Taskkill, or another command, if it is no longer working.