1

For example, is there a command that allows you to turn on the computer (be it a remote computer connected to the network or your own), for example, after a reboot, after a specified, strictly defined, period of time?

Is there a reverse command shutdown -s -t, for example (after turning off the computer), setting delayed switching-on after a specified period of time? Would it be possible to make it automatically turn on by a certain period of time, something like a delayed reboot with some time gap.

Das Alias
  • 11
  • 1
  • 1
    You can delay the reboot by providing the parameter `-r` instead of `-s` but if the computer is switched off there no command interpreter to wait and run your command. `¯\_(ツ)_/¯` – Olaf Apr 14 '23 at 19:45
  • 3
    If a computer is on a network, it can be configured to "wake up" and boot up on a command sent over the network. This is called "Wake on LAN", and if a computer is configured to allow this, you can set a task on another computer to sent a 'magic packet' (the WoL signal) at a specified time. – Jeff Zeitlin Apr 14 '23 at 19:58
  • Please provide enough code so others can better understand or reproduce the problem. – Community Apr 15 '23 at 02:26

1 Answers1

1

The only possible solution is the one, described by Jeff Zeitlin: Wake on LAN. In BIOS, there are Power related options. Inside them, you can set something like "Wake Up By Schedule". You can tune it to Everyday, at 8:00 AM, for example. But in that case, BIOS is in charge of executing that tuned command "wake_up_the_machine_ every_day_at_8:00AM". That's why WoL is developed - to override such limitations. If you use a computer with UEFI BIOS, you can program the UEFI by your code so the computer wakes up at the desired time.

stefanov
  • 11
  • 1
  • 1
    Hmmm ... IMO that's a bold claim to say "*The only possible solution is the one, ...*" since we actually don't know the exact requirements because @Das Alias did not share enough information yet. ;-) – Olaf Apr 15 '23 at 14:35