728x90 AdSpace

  • Latest News

    Wednesday, 18 January 2017

    Scehdule a Shutdown in Linux

    Scheduling a Shutdown in Linux, unlike Windows is a piece of cake.

    The Windows Way

    1. Create a bat file executing some run/win32/shutdown.exe.
    2. Schedule this using Windows Schedule Manger

    Linux Way

    Linux offers you tons of ways, forget at command or even cron. You can achieve this in one single command.



    shutdown -h 05:00

    This command will shutdown the machine the machine the instant the computer clock reaches 05:00 hours once.

    What happens if this time instant has passed already?

    In case the this time instant occurs on the same day. It will scheduled for the same day. Else this will be scheduled for the next day.
    This will schedule the shutdown just once.

    Terminal Output


    super@super-PI945GCM:~$ date
    Wed Jan 18 23:45:27 IST 2017
    super@super-PI945GCM:~$ shutdown -h 05:00
    Shutdown scheduled for Thu 2017-01-19 05:00:00 IST, use 'shutdown -c' to cancel.


    You might be interested in our other articles dealing with automation


    • Blogger Comments
    • Facebook Comments

    0 comments:

    Post a Comment

    Item Reviewed: Scehdule a Shutdown in Linux Rating: 5 Reviewed By: Unknown
    Scroll to Top