Differenze
Queste sono le differenze tra la revisione selezionata e la versione attuale della pagina.
| Entrambe le parti precedenti la revisioneRevisione precedenteProssima revisione | Revisione precedente | ||
| raspberry_trixie_come_datalogger [2026/06/21 00:26] – [1.8.1 Impostazioni di "crontab"] walter | raspberry_trixie_come_datalogger [2026/06/21 00:46] (versione attuale) – [1.8.1 Impostazioni di "crontab"] walter | ||
|---|---|---|---|
| Linea 288: | Linea 288: | ||
| ==== 1.8.1 Impostazioni di " | ==== 1.8.1 Impostazioni di " | ||
| - | crontab è <font inherit/ | + | crontab è |
| + | <font inherit/ | ||
| - | Ogni u <font inherit/ | + | Ogni u |
| + | <font inherit/ | ||
| + | |||
| + | Dato che a noi interessa modificare o gestire job di sistema ci concentreremo sull' | ||
| + | |||
| + | < | ||
| + | sudo -e | ||
| + | cd /.. | ||
| + | crontab -u root -e | ||
| + | |||
| + | </ | ||
| + | |||
| + | Si aprirà il file crontab in modifica con il contenuto già presente, noi dobbiamo aggiungere questi comandi: | ||
| + | |||
| + | <box 100% round #ffff99 #d2d2d2 #d2d2d2 #ffff99 | file: crontab> | ||
| + | # Edit this file to introduce tasks to be run by cron.\\ | ||
| + | #\\ | ||
| + | # Each task to run has to be defined through a single line\\ | ||
| + | # indicating with different fields when the task will be run\\ | ||
| + | # and what command to run for the task\\ | ||
| + | #\\ | ||
| + | # To define the time you can provide concrete values for\\ | ||
| + | # minute (m), hour (h), day of month (dom), month (mon),\\ | ||
| + | # and day of week (dow) or use ' | ||
| + | # Notice that tasks will be started based on the cron's system\\ | ||
| + | # daemon' | ||
| + | #\\ | ||
| + | # Output of the crontab jobs (including errors) is sent through\\ | ||
| + | # email to the user the crontab file belongs to (unless redirected).\\ | ||
| + | #\\ | ||
| + | # For example, you can run a backup of all your user accounts\\ | ||
| + | # at 5 a.m every week with:\\ | ||
| + | # 0 5 * * 1 tar -zcf / | ||
| + | #\\ | ||
| + | # For more information see the manual pages of crontab(5) and cron(8)\\ | ||
| + | #\\ | ||
| + | # m h dom mon dow command | ||
| + | |||
| + | # imposta un riavvio forzato alle 2:00 di notte\\ | ||
| + | 00 02 * * * sudo shutdoun -r now | ||
| + | |||
| + | # imposta il backup dei dati su un server remoto alle 21:15 di ogni giorno\\ | ||
| + | 15 21 * * * / | ||
| + | |||
| + | # al reboot o riavvio del raspberry imposta la velocità della seriale\\ | ||
| + | @reboot stty -F / | ||
| + | |||
| + | </box | ctrl+O per salvare e ctrl+X per uscire> | ||