Results 1 to 5 of 5

Thread: automatic shutdown

  1. #1

    Thumbs up automatic shutdown

    how can program automatic shutdown of my computer? I am using OpenSuse-11.1

  2. #2

    Default Re: automatic shutdown

    A cron job will do it.
    crontab -e
    Man first, have a try at Info, have a look at Wiki, if all that fails Scroogle!!!!!
    If I've helped click on the Rep button I don't know what it does but it sounds cool.

  3. #3

    Default Re: automatic shutdown

    Is this overkill? I wrote it because Gnome startup failed for me a couple of times so I thought I'd play safe when shutting down from a cronjob.

    Code:
    #!/bin/sh
    #
    # Do a gnome session logout before shutting down.
    #
    
    # The timeout used for this popup is arbitrary.
    xmessage -timeout 60 -center -buttons OK:0,Cancel:2 "Power Off PC?"
    if [ $? == 0 ] ; then
    
        # Request shutdown _before_ logout commences.
        # Allow enough time for logout to take place.
        # Allow enough time for atd one-minute resolution.
        echo "sudo /sbin/shutdown -h now" | at now+3min
    
        # Dialog appears with a built-in one minute timeout.
        # Cancelling logout in dialog does not cancel shutdown.
        # Cancelling shutdown with atq/atrm does not require sudo.
        # This script is done as soon as the dialog appears.
        gnome-session-save --kill
    
    fi
    
    #
    # Done.
    #

  4. #4

    Default Re: automatic shutdown

    If you are not experienced user here it is:

    Webpin

    KDE3 uses kshutdown,
    KDE4 uses kde4-kshutdown
    gnome uses gshutdown (it is version 0.2 and I don't know is it stable enough)

  5. #5

    Thumbs up [SOLVED] automatic shutdown

    I used
    Code:
     crontab -e
    it opened an editor, and I typed:
    Code:
     */5 * * * * /sbin/init 0
    To shutdown my PC 5 minutes after starting up
    See:
    Code:
     man crontab
    and
    Code:
     man cron
    Thank you very much!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •