[Cialug] scipts/php app for wakeonlan

Eric Junker eric at eric.nu
Tue Dec 4 13:54:47 CST 2007


First, if the hardware supports it you might want to consider hibernate 
instead of shutdown. Hibernate has the advantage of very low power 
consumption while still preserving the applications that you had open 
and should resume faster than it takes to do a cold boot.

I haven't used WOL but you can very easily create a windows scheduled 
task that can wake the machine at a specified time and then use NirCmd 
(http://www.nirsoft.net/utils/nircmd.html) and a scheduled task to 
hibernate or just manually hibernate instead of using shutdown.

If you want to read .ini files, PHP does have a parse_ini() function. 
You could also use something like Zend_Config from the Zend framework 
which supports .ini and XML formats.

Eric

Nathan C. Smith wrote:
> 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