PDA

View Full Version : Shutting the server down at night automatically



max.spicer
2005-07-21, 12:33
I'd like my Linux server that runs SlimServer to shut down automatically at night if no players are currently playing. I mentioned this a while ago and someone pointed out that I could do this using the SlimServer CLI. I've now written a Perl script to do just this, so thought I'd post it to get some general comments. The script interrogates the cli to find out if any players are playing and, if not, displays a warning on each player before triggering a delayed shutdown of the server. It's designed to be cronned every day between a certain time range (midnight to 8am, for example).

I'd appreciate any comments on this script. Part of the reason for doing it was to refresh my very rusty Perl, so picky language points are very welcome!

I haven't yet cronned this script myself, so caveat emptor!

Max

Ben Sandee
2005-07-21, 12:53
On 7/21/05, max. spicer <max.spicer.1sjbgb (AT) no-mx (DOT) forums.slimdevices.com> wrote:
> I haven't yet cronned this script myself, so caveat emptor!
>

Max, let's keep it to English on this forum/list OK? Maybe you should
request a Latin forum for your fancy-talk. How about it
Slimdevices...?

:)

Ben

MrC
2005-07-21, 13:33
> I haven't yet cronned this script myself, so caveat emptor!

Max, let's keep it to English on this forum/list OK?
Yeah, I agree. Cronned is not a word.

(nothing wrong with caveat emptor http://www.answers.com/caveat+emptor&r=67 - its part of the English lexicon.)

max.spicer
2005-07-22, 02:12
Cronned is a word in the UNIX world. Much quicker than "I haven't yet created a cron job to schedule this script automatically"! ;-)

I have now created a cron job and tested it, and it all works wonderfully. I love the fact that you can do this sort of thing with SlimServer/Squeezebox.

Max


Yeah, I agree. Cronned is not a word.

(nothing wrong with caveat emptor http://www.answers.com/caveat+emptor&r=67 - its part of the English lexicon.)

MrC
2005-07-22, 10:44
max, i was just busting Ben's chops, giving him a hard time via humor re: his comment about caveat emptor.

I'm a unix guy from way back, so completely understood cronned.

all in good fun.