Blogs on truth, technology, food, linux, leisure, experiences, adventure, romance, friends etc !

Hey dude, shutdown the machine, enough of surfing. Oops ! but the dude is sleeping!

Last night, i had a situation. A download was running on my Windows Server 2003 machine. But i had to retire for the bed and shutdown the machine after two hours. The command line interface permits to shutdown machine till a maximum of ten minutes* delay only. Hence, i started surfing the web for some auto shutdown timer softwares. But apart from giving fancy multicolored buttons for reboot and standby, i got nothing useful. Then i came up with the following.

File – shutdown.pl
——————————————————————–
#! /usr/bin/perl
sleep(5400); # time in seconds after which you want to shutdown.Its 5400 seconds here or 90 minutes.
system(”shutdown /s /t 00″);
———————————————————————————–
Run the program as perl shutdown.pl
And my job was done. However there might be more smarter ways to handle the situation.


__________________________________________________________________________________

*type shutdown on windows server 2003 command prompt and read carefully

Comments on: "Hey dude, shutdown the machine, enough of surfing. Oops ! but the dude is sleeping!" (6)

  1. Mohit Ranka said:

    Rakesh, seems like I am the only one vella enough to read your blog….

    PS – Story isn’t too different on my blog too :(

    Visit it on http://mohitranka.wordpress.com

  2. ha h a… know dude. its not the case. Many people read it. Check the older posts …

  3. Devil's Advocate said:

    i guess u cud hav used normal shutdown command with certain parameters.. m not sure abt server2003.. but it wrks pretty well on xp.. :)

  4. @devil
    ya dude. but it allows only till 10 minutes time … i have mentioned that !

  5. Thejasvi Bhat said:

    Looks like it is the OS , In XP , shutdown -t “time in seconds” works . And it works for more than 10 minutes also.
    shutdown -s -t 5400 -c “I am shutting down , this message cant be removed”

  6. @Thejasvi that limit is in Server 2003 . You did not follow “*” :)

Leave a comment for: "Hey dude, shutdown the machine, enough of surfing. Oops ! but the dude is sleeping!"