3/14/2023 0 Comments Wake up time roxy the hobo![]() ![]() The steps above will work for most people on most computers, but unfortunately I realized from this quick test that my particular ancient computer has problems with rtcwake. So I ran crontab -e to edit the cron jobs via vim and added these 2 lines: # inspired by and and ĥ9 23 * * * /usr/sbin/rtcwake -m disk -s 32460 > /code/cron.log 2>&1 I used a tool (such as *_*_*) to show me that the correct syntax for the go-to-sleep schedule that I want is 59 23 * * *.Īnd then I needed to calculate how many seconds the sleep should last: 9:00am is 9 hours + 1 minute after 11:59pm. I wanted my computer to sleep at 11:59pm local time each night and wake up each morning at 9:00am.Īnd I know that cronjobs can help with this. You wouldn’t want it waking up, running, and overheating or running down its battery in a laptop bag. Be careful when setting a laptop to automatically wake at a specific time.If sleep, suspend to RAM, or hibernate don’t work properly with your Linux system – perhaps because Linux doesn’t have the drivers to make them work properly with your hardware – this may not work.If you’re using an old computer with a dying CMOS battery that can’t keep the clock running properly, this won’t work. rtcwake uses your computer’s hardware clock, which you can set in your BIOS, to determine when your computer will wake up. 2>&1 option redirects error messages to the. Check the file SuspendResume.log for cron messages periodically and whenever there is a problem. There is no need for sudo prefix because cron runs with sudo privileges. Your cron table entry would look something like this: 0 1 * * * sh /usr/sbin/rtcwake -m mem -s 18000 > /home/Me/SuspendResume.log 2>&1 Rather than messing around with UTC, have your rtcwake command called from cron at 1am and wake up 18000 seconds later. Upon resuming firefox is automatically started up. This test will ensure suspending to RAM actually works. A simpler method is described here.īefore a full implementation of 1am sleep and 6am wake, you can do a simple 10 second test: sudo rtcwake -m mem -s 10 & firefox ![]() ![]() You can hibernate your PC by selecting Start, and then select Power > Hibernate.The script you are following is overly complicated.Under Shutdown settings, select the Hibernate checkbox (if it's available), and then select Save changes. Select Choose what the power button does, and then select Change settings that are currently unavailable.Select Start, then select Settings > System > Power & sleep > Additional power settings.Press the power button on your desktop, tablet, or laptop, or close your laptop's lid to make your PC sleep. ![]() Next to When I close the lid, select Sleep, and then select Save changes.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |