Hello Houssam,
If you Shake is connected to the internet, thus reachable from other computers, then y, you can log in remotely via SSH as explained here: How to access your Raspberry Shake’s computer via ssh
Once in, you can execute sudo reboot
to reboot the Shake, or sudo shutdown -h now
if you want to turn it off. Be aware that, with this last option, you will need to manually turn it on again.
Alternatively, you can schedule a cronjob that will restart the Shake at set times. After accessing the unit via SSH, execute sudo crontab -e
and then add a line similar to this:
0 2 * * * /sbin/shutdown -r now
If you are not familiar with this text editor, after opening the crontab, press i
, then copy the command adjusting the time to suit your needs, then press Esc
. Now write :wq
and press Enter to save everything.
Also, in case you’re not familiar with cronjob syntax, here’s a summarized explanation:
Each part has a specific meanig, allowing you to schedule tasks on a recurring basis.
-
0 2 * * *
- This part of the line specifies when the cron job will run.
-
0
- Minute (0-59) -
2
- Hour (0-23, where 2 refers to 2 AM) -
*
- Day of the month (1-31) -
*
- Month (1-12) -
*
- Day of the week (0-7, where both 0 and 7 represent Sunday)
-
/sbin/shutdown
- This is the command that is being scheduled. -
-r
- This is an option for theshutdown
command and it stands for reboot. -
now
specifies that the shutdown and reboot should happen immediately.
So, the entire line 0 2 * * * /sbin/shutdown -r now
schedules a reboot at 2 AM every day.