On Wed, 2005-06-08 at 20:07 +0200, Niek Jongerius wrote: > > I planned to have a cron job to shut down the server every night. As > > someone's already said, the problem here is working out when to do > > this. However, I'd just go for midnight on weekdays, and maybe 2am on > > Saturdays. For the rare exceptions, I'd have to remember to disable > > the cron. > > Just a tip: alter your cronjob to check for presence of a "flag" (maybe > a specific file). If it isn't there, don't shut down, but only set this > flag (create the file). This way, if you want to prevent the server from > shutting down on an evening, you just clear the flag (remove the file). The > machine won't shut down, but only restores the flag so it will shut down > next night again.
Alternatively, you could use the CLI from your script to interrogate your players. If any of them are playing then sleep for an hour and try again. That way any unusual late night music listening won't get interrupted, and you won't have to remember to disable the cron or remove a file etc. - just make sure you stop all your players. -- "The biggest problem encountered while trying to design a system that was completely foolproof, was, that people tended to underestimate the ingenuity of complete fools." (Douglas Adams) _______________________________________________ Discuss mailing list [email protected] http://lists.slimdevices.com/lists/listinfo/discuss
