I wonder if it is possible to schedule a machine to boot up at a determined time using cron. Imagine I want my server to shut down at night and boot back up in the morning. I've rad many docs and questions but not a word on this, maybe there's another way of scheduling a boot?
Asked
Active
Viewed 581 times
2 Answers
1
Not possible using any commands from your server. Because server is stopped. You should use service providing by hosting provider for booting like Amazon lambda
1
Booting at a specific time is sometimes a BIOS option. Your Ubuntu OS has no way to read or change such BIOS options, if they exist on your system at all.
You can suspend (instead of poweroff) your system using cron.
- How to suspend (including wakeup) using cron.
- Some systems can indeed be started from poweroff using Wake-on-LAN. It's a BIOS feature, not all systems have it.
If you system is suspended instead of powered off, you can use a Wake On LAN (WOL) packet from another machine on your LAN to awaken the suspended machine. The suspended system must accept WOL packets. Obviously, the cron job must reside on the sending system, since the receiver is suspended.

user535733
- 62,253
cron
to callwake-on-LAN
in the Pi to start your main machine. – user68186 Jul 30 '20 at 21:28