To shutdown a pc using perl one can write a one liner at command prompt as below
perl -e "sleep(3600); system('shutdown.exe -s')"
Thats it... the sleep(3600) will make the program sleep for 1 hour i.e 3600 seconds. According one can schedule the shutdown delay and have a peacefull sleep or walkaround in the park.
Showing posts with label perl fun. Show all posts
Showing posts with label perl fun. Show all posts
Monday, November 12, 2007
One liner to shutdown a windows pc using perl
Posted by
Nexis
at
10:41 AM
0
comments
Labels: perl fun
Subscribe to:
Posts (Atom)