Ability to schedule a Start or Stop of Roon/RoonServer

I am requesting a way to automatically start and/or stop Roon from the Task Scheduler in WIN10.

If one can’t do via cron in Linux or whatever device for scheduling that macOS uses, then consider that part of the request.

I agree it would be nice to have a fully supported and integrated set of tools for managing the Roon server process on all platforms and I definitely support the feature request.

If you are interested though there are few existing workarounds that I am aware of in Windows and ROCK.

In Windows you can close the RoonServer.exe process and this will in-turn stop RoonAppliance.exe, which is the actual server component I think. You can try taskkill to tell RoonServer.exe to close, with the /im switch.
To start you need to launch RoonServer.exe and it will start the RoonAppliance.exe process as I understand it.

If the server is running on a ROCK appliance then you can start/stop/poweroff/restart it by using the relevant URL to the admin page e.g. http://xxx.xxx.xxx.xxx/1/poweroff call it with wget etc. from another device. There is a URL for each function the admin page supports

Not sure about macos or Linux.

I don’t understand why when invoking the same exe in Task Scheduler that is invoked by the Desktop icon that a Roon startup isn’t accomplished. So, there’s that.

I will check out these other solutions, but my fear is that any attempt to ‘fool mother nature’, so to speak, has the potential to result in Roon library corruption, which (it would seem) is all too easy.

In that camp, I place the instance where one shuts down WIN10 thru Task Scheduler (without first being able to shut down Roon) and then later bringing the Core machine up automatically thru BIOS and genning RoonServer to startup on machine startup. I don’t believe that has been a good idea on my part.

I no longer run RoonServer after finding that, in spite of being idle, it has crashed during the night or after having it crash in the middle of playing a track.

The complete Roon seems to be more stable than RoonServer, which doesn’t make much sense since (I assume) RoonServer is only a subset of Roon.

Dunno.

This is interesting.

With all the recent troubles I been having with Roon library, I’ve been considering ROCK, hopefully in a VM.

I have this integrated this in my homebridge via http-plugin, so I can tell Siri to restart, reboot, start playback, pause, whatever…

If you’re shutting down your Core machine that way, then that’s a tragedy waiting to happen.

?

/10charac

Hmm, don’t understand your post.

More detail?

Yes, I deleted it, I think I’ve misunderstood yours :rofl:

1 Like

I’m not sure this could ever be a “clean” way to control the server. A smarter “idle: sleep / activity: wake” mechanism may be better??

I no longer run RoonServer after finding that, in spite of being idle, it has crashed during the night

I’ve never experienced this with Rock.

If Roon were written so that it could be invoked with a command line option to shut down a running instance, then that could be put into Task Scheduler, or whatever schedules tasks on the OS of choice.

As it is now, one can’t even start Roon from Task Scheduler.

I am queasy about using Task Scheduler to shut down Windows, without first shutting down Roon.

Yeah, I’ve been thinking about that.

Why turn off the server at all? I leave mine on 24/7, Windows and all.

1 Like

Yeah, I used to do that until lately.

You may have noticed I’ve been having multiple problems with Roon library and I’m trying to limit my exposure to any Roon mishaps.

I’ve never gotten a definitve answer as to whether Win10 shutting down to do an update is considered an abnormal shutdown by Roon.

Also, there’s no real reason to have my media serving machine up at oh-dark-thirty.

You should try a NUC with Rock :wink:

1 Like

I had ROCK an i3 NUC. It ran OK.

Philosophically, I’m against ROCK, in that once it’s on a machine that’s it. No other media serving, i.e. Plex or JShiver, no software backing up one’s internal music, etc…

Winter is coming, so probably an experiment with ROCK in a VM.

1 Like

I do this on MacOS with AppleScript and Keyboard Maestro. I have a simple script to close the Roonserver app, wait a few seconds, and then start it again. KM runs the script a few times a week in the middle of the night and also makes it available via a HTTP server.

Since implementing the scheduled restarts, I haven’t had any Roonserver slowdowns, which were pretty frequent in the past when it had been running for more than a few days.

Ideally, Roon would fix whatever’s causing the slowdowns, but this setup works great until that happens.

I should add: it would be easy to add the script to a crontab, instead of using KM. But I already had a KM license and wanted the option to do a remote restart via the HTTP server.

Hmm, I hadn’t thought about keyboard macros or scripts or things of that nature.

There are things like that for for WIN10, also.

My request still stands, however.

One shouldn’t have to resort to such things when the simplest option is a command line parm inside Task Scheduler.

In case it’s helpful to someone, here’s a simple AppleScript to restart RoonServer on a Mac:

tell application "RoonServer.app"
   quit
end tell

delay 5

tell application "RoonServer.app"
   activate
end tell

Paste the code into AppleScript Editor and save it as a .scpt file or application. Run it directly or in Terminal.app with something like:

osacript ~/roonrestarter.scpt

To run it on a schedule, add that command to your crontab.

You could also modify the script to run from a remote Mac (i.e., not the one running RoonServer)–if, for example, you have RoonServer running on a headless Mac Mini and control it from a MacBook.

1 Like

Well, there is always the start up period where Roon will re-scan the library. Things normally done at oh-dark-thirty,.