Find the answer to your Linux question:
Results 1 to 6 of 6
I want my laptop to suspend after, say, an hour and then wake at a specified time. I found rtcwake that works to bring it out of suspend, but can't ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2006
    Posts
    6

    Can I make my laptop suspend and then wake without prompting


    I want my laptop to suspend after, say, an hour and then wake at a specified time. I found rtcwake that works to bring it out of suspend, but can't seem to find anything to make it suspend after a specified time. What I want it to do is play music as I am going to sleep, place itself in suspend mode and then wake after say 8 hours. The "at" command seemed to fit the bill, but "sudo at" returns "sudo: at: command not found". Is there a way to add "at" to the bash commands on my system? OS is Crunchbang Waldorf and the laptop is a Toshiba Satellite PSLB8U. Or perhaps there is a better way? Thanks

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,691
    Normally, the at command is located in /usr/bin. So, run the command "which at" and see where it is. Then, you can use that path with sudo and it should work, such as "sudo /usr/bin/at cmd".
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Mar 2006
    Posts
    6
    Thanks for the reply. "Which at" just takes me back to the command prompt. I reviewed the file names in /etc/profile and "at" doesn't seem to be included. Can I add it in some way?

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,691
    The "at" command should be included in just about every distribution. What distribution are you running? FWIW, there is an "at" package in my Red Hat (Scientific Linux) base repository, so it may just have not been installed on your system. How you install it depends upon the distribution you have.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  6. #5
    Just Joined!
    Join Date
    Mar 2006
    Posts
    6
    Thanks Rubberman! Your FWIW pointed me to synaptic and sure enough "at" was there. I just finished running a couple of tests using at and rtcwake and it works just as I had hoped!
    Last edited by gpfromnc; 09-08-2013 at 12:51 AM. Reason: update

  7. #6
    Just Joined!
    Join Date
    Oct 2013
    Posts
    13
    Quote Originally Posted by Rubberman View Post
    Normally, the at command is located in /usr/bin. So, run the command "which at" and see where it is. Then, you can use that path with sudo and it should work, such as "sudo /usr/bin/at cmd".
    Hey Thanks for suggestion its really helpful.

Posting Permissions

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