Get Raspberry to reboot every night

Get Raspberry to reboot every night

The Raspberry can dependent of the usage and the programs that runs “eat up” it’s memory sooner or later. This can cause all kind erratic behaviors. To be sure to have a clean and “fresh” rebooted version every day you can add an automatic job to reboot it. This is easily done using a cronjob.

To change setup use an editor and edit the file:

Cronjob

A Cron (comes from Greek Chronos) is used to schedule various commands at a specific time. Scheduled tasks or commands is called “Cron Jobs”. These can be used for running automated backups, monitoring disk space, deleting files periodically etc.

To do this log into your Raspberry Pi using SSH. Putty is a perfect tool for this

sudo crontab -e

If this is your first time setting up cronjobs you will be asked to select an editor

I selected the first one by typing “1” to select the nano editor

I want my raspberry pi to boot every night at 3am. (03:00).

Add the following command to the end of the file

0 3 * * * /sbin/shutdown -r now

This will shutdown and reboot the raspberry pi scheduled every night at 3 o’clock

Now press Ctrl-O to write the changes to the file and exit by pressing Ctrl-X

Check that the Raspberry Pi knows the time of day

To make sure your Raspberry Pi knows the time of day and therefore does the cronjobs on the correct time of the day, you can ask it about the time by typing this command:

timedatectl status

In this example you can see the time and also make sure that it updates it clock automatically as it’s using a NTP Service The NTP service is active and the time I got from this command is the correct time in my day zone.

Share this content:

3 Comments

zoritoler imol Posted on05:48 - August 5, 2022

But a smiling visitor here to share the love (:, btw outstanding style and design. “Everything should be made as simple as possible, but not one bit simpler.” by Albert Einstein.

JeraldQuode Posted on15:37 - October 1, 2022

Питер – город возможностей. Жизнь здесь не замирает даже ночью. Он предлагает много развлечений как для местных жителей, так и для гостей северной столицы. Если хотите расслабиться, приятно отдохнуть, то проститутки СПб скрасят досуг, помогут забыть о текущих проблемах, хлопотах, заботах. В помощь при поиске кандидатуры создан этот ресурс, информация на котором постоянно обновляется. С помощью расширенного поиска можно быстро сделать выбор в пользу девушки, которая подойдет по внешним данным. Меню сайта порадует простотой, удобством, даже если вы новичок. Теперь выбрать девушку для приятного досуга не составит труда. Не нужно никуда ехать, изучать десятки сайтов, звонить по сомнительным номерам. Вам предложена обширная база с куртизанками на любой вкус и кошелек. Они принимаются в своих апартаментах, выезжают на квартиры, в бани, сауны, в загородные дома.

[url=https://publichome-1.org/city/ropsha_]Проститутки Ропша[/url]

JeraldQuode Posted on02:28 - August 12, 2023

ChemDiv’s Screening Libraries have been extensively validated both in our in-house biological assays and in the laboratories of over 200 external partners including Pharma, Biotech, Academia and Screening Centers in the U.S., Europe, and Japan. We offer a shelf-available set of over 1.6 M individual solid compounds.
[url=https://www.chemdiv.com/catalog/focused-and-targeted-libraries/protein-kinases-inhibitors-library/]kinases inhibitors[/url]

Leave a Reply