[Cialug] scipts/php app for wakeonlan

Josh More morej at alliancetechnologies.net
Tue Dec 4 14:04:28 CST 2007


Cron is great for running tasks at specific times.  However, the idea of
using cron to run a script every 15 minutes, when you do not have a
specific task to do every 15 minutes is unwise.  You would basically be
implementing a daemon that is dependent on another daemon.  If you want
to use cron to keep your daemon up and running, you need either write
your daemon better or use supervise to control it.

However, if you goal is to simply conserve power, I second the
suggestion to use the built-in power management and just have the
machine hibernate after inactivity.  Then, you can just run a simple
monitoring system (mon comes to mind) to scan your network at midnight
and let you know which workstations aren't configured correctly.

 
 

-Josh More, RHCE, CISSP, NCLP, GIAC 
 morej at alliancetechnologies.net 
 515-245-7701



>>> "Nathan C. Smith" <nathan.smith at ipmvs.com> 12/04/07 1:29 PM >>> 

I was thinking about writing something that would let people schedule
their
machines to start up and be ready for them in the morning using
wakeonlan.
This would allow them to shut their windows machines down at night but
have
them ready for them in the morning.  In theory, this would be to save
electricity and help people who have a green conscience.

Has anybody seen or used something similar?

A web form to allow them to select days and times for their machine to
start
up - maybe in 15 minute increments.  I'm not sure if I would keep the
settings in a database or not.  If php has some .ini file or
plist-type
libraries I might choose those instead to keep the footprint small
(sacrificing scalability).  Is there anything similar to wakeonlan to
shutdown?  I wonder if there are any linux-based windows shutdown
programs
like psshutdown.  I bet there are some WMI scripts that could do
that.....

What is the best way to schedule a reoccurring item in php?  Use cron
to run
a script every 15 minutes or so?


-Nate
_______________________________________________
Cialug mailing list
Cialug at cialug.org
http://cialug.org/mailman/listinfo/cialug



More information about the Cialug mailing list