Skip to main content
Auto Reboot Scheduler for Armbian Linux (Crontab & Systemd)

Auto Reboot Scheduler for Armbian Linux (Crontab & Systemd)

Zarvelion Zynji
Author
Zarvelion Zynji
Tech enthusiasts (self-proclaimed). Gaming addict (diagnosed). Anime simp (no regrets). I turn my hyperfixations into content—welcome to the chaos.
Table of Contents

Why Set Up Auto Reboot in Armbian?
#

Scheduled reboots help: ✅ Refresh the system in a clean stateReduce memory leaksPrevent hangs on low-resource devices (SBC like Raspberry Pi, Orange Pi, etc.)

Method 1: Using Crontab (Recommended) #

Crontab is a built-in Linux tool to schedule commands.

Step 1: Open Terminal & Edit Crontab
#

sudo crontab -e

(Choose your preferred editor, like nano)

Step 2: Add Reboot Schedule
#

Example reboot daily at 03:00:

0 3 * * * /sbin/reboot

Example reboot every Sunday at 04:00:

0 4 * * 0 /sbin/reboot

Crontab Format Explanation:
#

* * * * * command
│ │ │ │ └─ Day (0-7, 0=Sunday)
│ │ │ └─── Month (1-12)
│ │ └───── Date (1-31)
│ └─────── Hour (0-23)
└───────── Minute (0-59)

Step 3: Save & Verify
#

  • Press Ctrl + XYEnter to save

  • Check the schedule with:

    sudo crontab -l

Method 2: Using Systemd Timer (Alternative)
#

If you prefer systemd, follow these steps:

Step 1: Create Service File
#

sudo nano /etc/systemd/system/reboot.service

Add the following:

[Unit]
Description=Reboot System

[Service]
Type=oneshot
ExecStart=/sbin/reboot

Step 2: Create Timer File
#

sudo nano /etc/systemd/system/reboot.timer

Example daily reboot at 03:00:

[Unit]
Description=Reboot System Daily

[Timer]
OnCalendar=*-*-* 03:00:00
Persistent=true

[Install]
WantedBy=timers.target

Step 3: Enable the Timer
#

sudo systemctl enable reboot.timer
sudo systemctl start reboot.timer

Verify with:

systemctl list-timers

Additional Tips
#

🔹 Reboot Log: Add >> /var/log/reboot.log 2>&1 in crontab to log output 🔹 Testing: Test manually with sudo reboot 🔹 Check Timezone: Confirm server time with date or timedatectl


Summary
#

With crontab or systemd timer, you can set automatic reboot schedules in Armbian/Linux to keep your system stable. Choose the method you prefer!

Related


Load Comments