Shut down computer every night, and wake it up every morning

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite
1












I have seen other topics about this, and have attempted it many times, but it fails for me.



I have a desktop that I want to schedule to shut down at midnight, every night, and wake up at 6 am.



I ran sudo crontab -e and added @daily poweroff.



I also edited /etc/crontab and added 00 0 * * * root poweroff
.
Above that, I added 00 0 * * * root rtcwake -m no -l -t $(date +%s -d "tomorrow 6:00")



The idea is that cron would get the message to wake up the next morning, and then get the poweroff message. This doesn't work, though. I'm not sure if the rtcwake part is doing anything, because the computer never shuts down in the first place.



Can anyone tell me what I'm doing wrong? Thanks.







share|improve this question
















  • 2




    if you shutdown your computer then Operating System (Ubuntu in this case) can't do anything. it may depends on BIOS I think
    – noone
    Apr 26 at 12:38














up vote
0
down vote

favorite
1












I have seen other topics about this, and have attempted it many times, but it fails for me.



I have a desktop that I want to schedule to shut down at midnight, every night, and wake up at 6 am.



I ran sudo crontab -e and added @daily poweroff.



I also edited /etc/crontab and added 00 0 * * * root poweroff
.
Above that, I added 00 0 * * * root rtcwake -m no -l -t $(date +%s -d "tomorrow 6:00")



The idea is that cron would get the message to wake up the next morning, and then get the poweroff message. This doesn't work, though. I'm not sure if the rtcwake part is doing anything, because the computer never shuts down in the first place.



Can anyone tell me what I'm doing wrong? Thanks.







share|improve this question
















  • 2




    if you shutdown your computer then Operating System (Ubuntu in this case) can't do anything. it may depends on BIOS I think
    – noone
    Apr 26 at 12:38












up vote
0
down vote

favorite
1









up vote
0
down vote

favorite
1






1





I have seen other topics about this, and have attempted it many times, but it fails for me.



I have a desktop that I want to schedule to shut down at midnight, every night, and wake up at 6 am.



I ran sudo crontab -e and added @daily poweroff.



I also edited /etc/crontab and added 00 0 * * * root poweroff
.
Above that, I added 00 0 * * * root rtcwake -m no -l -t $(date +%s -d "tomorrow 6:00")



The idea is that cron would get the message to wake up the next morning, and then get the poweroff message. This doesn't work, though. I'm not sure if the rtcwake part is doing anything, because the computer never shuts down in the first place.



Can anyone tell me what I'm doing wrong? Thanks.







share|improve this question












I have seen other topics about this, and have attempted it many times, but it fails for me.



I have a desktop that I want to schedule to shut down at midnight, every night, and wake up at 6 am.



I ran sudo crontab -e and added @daily poweroff.



I also edited /etc/crontab and added 00 0 * * * root poweroff
.
Above that, I added 00 0 * * * root rtcwake -m no -l -t $(date +%s -d "tomorrow 6:00")



The idea is that cron would get the message to wake up the next morning, and then get the poweroff message. This doesn't work, though. I'm not sure if the rtcwake part is doing anything, because the computer never shuts down in the first place.



Can anyone tell me what I'm doing wrong? Thanks.









share|improve this question











share|improve this question




share|improve this question










asked Apr 26 at 12:21









3x5

516




516







  • 2




    if you shutdown your computer then Operating System (Ubuntu in this case) can't do anything. it may depends on BIOS I think
    – noone
    Apr 26 at 12:38












  • 2




    if you shutdown your computer then Operating System (Ubuntu in this case) can't do anything. it may depends on BIOS I think
    – noone
    Apr 26 at 12:38







2




2




if you shutdown your computer then Operating System (Ubuntu in this case) can't do anything. it may depends on BIOS I think
– noone
Apr 26 at 12:38




if you shutdown your computer then Operating System (Ubuntu in this case) can't do anything. it may depends on BIOS I think
– noone
Apr 26 at 12:38










2 Answers
2






active

oldest

votes

















up vote
0
down vote













  1. your poweroff option in the crontab is okay. Test it.

  2. The wake up needs to be set up in Bios, so remove the rtc-wake line from crontab and reboot, go to Bios and set up wake up there.





share|improve this answer



























    up vote
    0
    down vote













    If you want to go old skool you set your BIOS to boot when AC power is applied, then plug your PC into an outlet timer that turns on at your desired boot time. Set your daily poweroff as above and have the timer go off after that.






    share|improve this answer




















      Your Answer







      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "89"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      convertImagesToLinks: true,
      noModals: false,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













       

      draft saved


      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1028392%2fshut-down-computer-every-night-and-wake-it-up-every-morning%23new-answer', 'question_page');

      );

      Post as a guest






























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      0
      down vote













      1. your poweroff option in the crontab is okay. Test it.

      2. The wake up needs to be set up in Bios, so remove the rtc-wake line from crontab and reboot, go to Bios and set up wake up there.





      share|improve this answer
























        up vote
        0
        down vote













        1. your poweroff option in the crontab is okay. Test it.

        2. The wake up needs to be set up in Bios, so remove the rtc-wake line from crontab and reboot, go to Bios and set up wake up there.





        share|improve this answer






















          up vote
          0
          down vote










          up vote
          0
          down vote









          1. your poweroff option in the crontab is okay. Test it.

          2. The wake up needs to be set up in Bios, so remove the rtc-wake line from crontab and reboot, go to Bios and set up wake up there.





          share|improve this answer












          1. your poweroff option in the crontab is okay. Test it.

          2. The wake up needs to be set up in Bios, so remove the rtc-wake line from crontab and reboot, go to Bios and set up wake up there.






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Apr 26 at 13:27









          kukulo

          892416




          892416






















              up vote
              0
              down vote













              If you want to go old skool you set your BIOS to boot when AC power is applied, then plug your PC into an outlet timer that turns on at your desired boot time. Set your daily poweroff as above and have the timer go off after that.






              share|improve this answer
























                up vote
                0
                down vote













                If you want to go old skool you set your BIOS to boot when AC power is applied, then plug your PC into an outlet timer that turns on at your desired boot time. Set your daily poweroff as above and have the timer go off after that.






                share|improve this answer






















                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  If you want to go old skool you set your BIOS to boot when AC power is applied, then plug your PC into an outlet timer that turns on at your desired boot time. Set your daily poweroff as above and have the timer go off after that.






                  share|improve this answer












                  If you want to go old skool you set your BIOS to boot when AC power is applied, then plug your PC into an outlet timer that turns on at your desired boot time. Set your daily poweroff as above and have the timer go off after that.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Apr 26 at 13:42









                  Organic Marble

                  9,79263153




                  9,79263153



























                       

                      draft saved


                      draft discarded















































                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1028392%2fshut-down-computer-every-night-and-wake-it-up-every-morning%23new-answer', 'question_page');

                      );

                      Post as a guest













































































                      Popular posts from this blog

                      pylint3 and pip3 broken

                      Missing snmpget and snmpwalk

                      How to enroll fingerprints to Ubuntu 17.10 with VFS491