Announcement

Collapse
No announcement yet.

Hibernate at certain hours. It's possible?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Uff, too complicated for me hehehe.

    I'm going to leave it as in the image that works for me ("cron") and I don't get complicated trying to do a bash.

    I will delete the sudo as you have indicated.

    Thank you so much.​

    EDIT:

    I have a problem.
    I have an external hard drive connected, but when the computer wakes up, the drive is not mounted, and I have to manually click mount. Is there any way so that after waking up with the cron command, the hard drive is mounted?

    Maybe with this command in cron?

    Code:
    mount /dev/sdb1​
    Thank you.​
    Last edited by Anjunas; Dec 22, 2023, 06:04 PM.

    Comment


      #17
      Best to combine it with a logical AND, so the entry in the systemwide crontab would be something like
      Code:
      30 16 * * *    root    rtcwake -m mem -l -t "$(date -d 'today 22:30:00' '+\%s')" && mount -MOUNTOPTIONS /DEVICE /MOUNTPOINT
      Replace -MOUNTOPTIONS, /DEVICE and /MOUNTPOINT with the correct values.

      See man mount.

      At this point I would really consider using a shell script or at least to pipe the (error) output into a log file…
      Last edited by Schwarzer Kater; Dec 22, 2023, 09:37 PM.
      Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
      Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

      get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
      install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

      Comment


        #18

        Hello, thanks for helping.

        I'm sorry if I don't understand many of the things you explained to me, but I really don't know much. I try to look for information on the things you tell me, but either I can't find them, or I don't know what I'm looking for or I don't understand what I'm reading hehehe.


        I really don't know what this is: -MOUNTOPTIONS /DEVICE /MOUNTPOINT

        I think, /device is /dev/sdb1, and not sure if Mountpoint is /media/pollo/Pollo but -MOUNTPINTS really i have no idea hehe.​​


        I have gotten this information from the disk (photo), but I don't know which one it is.​

        Originally posted by Schwarzer Kater View Post

        At this point I would really consider using a shell script or at least to pipe the (error) output into a log file…
        I think this is way beyond me, any guide?


        Thanks and regards.​​
        You may only view thumbnails in this gallery. This gallery has 1 photos.

        Comment


          #19
          You could look here https://www.kubuntuforums.net/forum/.../documentation or search the internet for all your fundamental Linux questions.
          And here is a YouTube channel that has a series about Linux CLI commands and many other things: https://www.youtube.com/@LearnLinuxTV

          To get a list of block devices in *Ubuntu enter e.g. lsblk -e7 or lsblk -f -e7 in the Konsole terminal emulator​.
          To get a list of USB devices enter e.g. lsusb or lsusb -tv in Konsole.

          And there are the man pages for each command (e.g. enter man mount in Konsole as I suggested above).
          Last edited by Schwarzer Kater; Dec 23, 2023, 03:11 PM.
          Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
          Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

          get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
          install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

          Comment

          Working...
          X