Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7596

General discussion • Re: Resetting at a certain time every night (Pi5)

$
0
0
The underlying Linux distribution for the PI is Debian Linux, so the following high level instructions will work: I am assuming you have a basic level knowledge of Linux administration. Otherwise, I can give complete script if required.

The linux crontab facility allows you to run a bash script at a specific time and date, repeatedly.
1. Create a bash script containing the sudo shutdown -r now command.
2. Make the script executable using chmod +x <script_name>.sh.
3. Schedule the script to run nightly using crontab -e and adding a line like 0 3 * * * /path/to/<script_name>.sh

P.S: Having to reboot a system every 24 hours to keep an application running is not a desirable situation, having said that, I have had to reboot systems every 4 weeks because of application memory leaks.

Statistics: Posted by Henderson Hood — Wed Apr 09, 2025 6:28 pm



Viewing all articles
Browse latest Browse all 7596

Trending Articles