Shut down computer every night, and wake it up every morning
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
0
down vote
favorite
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.
shutdown cron rtc
add a comment |Â
up vote
0
down vote
favorite
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.
shutdown cron rtc
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
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
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.
shutdown cron rtc
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.
shutdown cron rtc
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
add a comment |Â
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
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
0
down vote
- your poweroff option in the crontab is okay. Test it.
- 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.
add a comment |Â
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.
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
- your poweroff option in the crontab is okay. Test it.
- 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.
add a comment |Â
up vote
0
down vote
- your poweroff option in the crontab is okay. Test it.
- 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.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
- your poweroff option in the crontab is okay. Test it.
- 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.
- your poweroff option in the crontab is okay. Test it.
- 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.
answered Apr 26 at 13:27
kukulo
892416
892416
add a comment |Â
add a comment |Â
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.
add a comment |Â
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.
add a comment |Â
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.
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.
answered Apr 26 at 13:42
![](https://i.stack.imgur.com/DbsU5.jpg?s=32&g=1)
![](https://i.stack.imgur.com/DbsU5.jpg?s=32&g=1)
Organic Marble
9,79263153
9,79263153
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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