iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
To reboot an Ubuntu server every day at 03:00, add a root cron entry containing 0 3 * * * /usr/sbin/shutdown -r now. First confirm the command path, edit root’s crontab with sudo crontab -e, verify the saved entry, test it during an approved maintenance window, and check reboot history and logs afterward. The reboot will terminate sessions and interrupt running workloads, so treat the schedule as a production change rather than a harmless housekeeping task.
What the cron entry does
Ubuntu cron uses five time fields followed by the command. In 0 3 * * * /usr/sbin/shutdown -r now, the first five fields mean:
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problems| Field | Value | Meaning |
|---|---|---|
| Minute | 0 | At minute zero |
| Hour | 3 | At 03:00 in the server’s configured timezone |
| Day of month | * | Every day of the month |
| Month | * | Every month |
| Day of week | * | Every day of the week |
shutdown -r now asks Ubuntu’s shutdown utility to reboot immediately when cron invokes it. The command can also halt or power off a machine, and it accepts a 24-hour time, a delay such as +5 minutes, or now. A scheduled shutdown creates /run/nologin five minutes before the system goes down, preventing new logins during that final interval.
Before scheduling a reboot
Confirm the maintenance window
A reboot drops SSH connections, terminates interactive sessions, and can interrupt databases, queues, uploads, batch jobs, and other processes that are not designed to stop at that moment. Notify users, drain traffic or workloads where necessary, and make sure critical services are configured to start automatically after boot. Do not install an untested reboot job on a production host.
#1 Best Overall
- Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
- With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
- Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
- Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
- Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.
Check the server timezone
Cron evaluates the schedule using the host’s configured timezone. It does not translate 03:00 into your preferred business timezone. Check the server’s timezone with timedatectl and choose the cron hour that matches the local maintenance window. Recheck this after migrations, image changes, or timezone configuration updates.
Verify the shutdown path
Cron runs with a limited environment and may not have the same PATH as your shell. Find the installed command before editing the schedule:
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutecommand -v shutdown
Ubuntu commonly reports /usr/sbin/shutdown. Use the path returned on this host rather than assuming that a shell command found interactively will also be found by cron.
Set up a daily 03:00 reboot with root’s crontab
- Open the root crontab. Run
sudo crontab -e. The unqualified commandcrontab -eedits the current user’s crontab; it does not create a root-level job unless you are already operating as root. - Choose an editor if prompted. Save the file using the editor’s normal save-and-exit commands. Keep existing entries unless you have verified that they are obsolete.
- Add the schedule on its own line.
0 3 * * * /usr/sbin/shutdown -r nowUse the exact path returned by
command -v shutdownif it differs. - Save and exit. Cron normally detects the updated crontab automatically. A syntax or installation message should be treated as an error to resolve, not ignored.
- Verify the installed entry.
sudo crontab -lConfirm that the line appears under root and that it has five schedule fields, the intended hour, and an absolute command path.
- Test the command separately. During an approved window, run
sudo /usr/sbin/shutdown -r now(or the verified path). This is an immediate reboot, so save work and disconnect users first. Testing the command proves that permissions and the executable path work; it does not prove that the future cron time is correct.
Log the job so a missed reboot is diagnosable
For a first deployment, append standard output and errors to a dedicated log:
Rank #2
- Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
- Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
- Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
- Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
- Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth
0 3 * * * /usr/sbin/shutdown -r now >>/var/log/cron-reboot.log 2>&1
The reboot may occur before a useful message is written, but redirection can expose permission, path, or invocation errors. Ensure the log has an appropriate ownership and rotation policy; an indefinitely growing file is not a good long-term design.
After the first scheduled window, review reboot history:
last reboot
Inspect the cron service and system journal around the expected time. On Ubuntu, commands such as journalctl -u cron and a time-bounded journalctl query can help correlate cron activity with the reboot. Review the previous boot’s journal when the reboot itself makes the current session too new to show the relevant messages.
Use a warning period instead of an immediate reboot
If users need notice, replace now with a delay:
shutdown -r +5 'Scheduled maintenance reboot'
This asks for a reboot five minutes after cron runs and supplies a message for logged-in users. Ubuntu’s shutdown behavior and cancellation details can vary by release and environment, so verify them on the installed version before relying on the warning workflow. The usual cancellation command is shutdown -c; test the complete sequence in a non-production window before deploying it.
Rank #3
- 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
- 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
- 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
- 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
- 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.
Root crontab or /etc/cron.d?
Both approaches can run a privileged reboot, but they have different syntax and administration models.
| Location | Entry format | When it fits | Important detail |
|---|---|---|---|
| Root’s crontab | 0 3 * * * /usr/sbin/shutdown -r now |
A single administrator-managed job | Edit and inspect with sudo crontab -e and sudo crontab -l. |
/etc/cron.d |
0 3 * * * root /usr/sbin/shutdown -r now |
A separately named, configuration-managed file | The username field is mandatory, and the filename must meet cron’s stricter naming rules. |
/etc/crontab |
Includes a username field like /etc/cron.d |
System-wide schedules maintained in the central file | Changes affect a shared system file; use care with configuration management. |
For the straightforward nightly reboot described here, root’s crontab is usually the least surprising choice. Use /etc/cron.d when you need a distinct file owned by a package or configuration-management system and can enforce its permissions, naming, and review process.
What happens if the server is down at 03:00?
Plain cron does not replay a missed execution. If the machine is powered off, halted, or otherwise unavailable when the scheduled minute passes, the reboot command is not queued for the next boot. The server simply starts normally when it returns.
This distinction matters for hosts that may be offline during the maintenance window. Ubuntu’s cron documentation distinguishes regular cron and anacron from persistent systemd timers: a persistent timer can trigger a missed run after the machine comes back online. Choose that model only when catch-up behavior is actually wanted; automatically rebooting immediately after an unexpected outage may be undesirable.
Rank #4
- 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
- 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
- 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
- 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
- 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.
When a systemd timer is a better fit
A systemd timer is preferable when you need persistence, explicit service dependencies, journal-native status, or ordering controls. Cron remains appropriate when a simple recurring command is all that is required and operators already manage crontabs.
| Decision factor | Cron | systemd timer |
|---|---|---|
| Schedule | Compact five-field expression | OnCalendar= expressions with systemd calendar syntax |
| Missed runs | No catch-up for ordinary cron | Persistent=true can run a missed activation after boot |
| Dependencies and ordering | Limited | Native service relationships and ordering |
| Observability | Cron logs and optional redirection | Service status and journal integration |
| Administration | Familiar, minimal configuration | Two unit files and systemd commands |
Example systemd service
Create /etc/systemd/system/server-reboot.service:
[Unit]
Description=Scheduled server reboot
[Service]
Type=oneshot
ExecStart=/usr/sbin/shutdown -r now
Example persistent timer
Create /etc/systemd/system/server-reboot.timer:
[Unit]
Description=Daily server reboot timer
[Timer]
OnCalendar=*-*-* 03:00:00
Persistent=true
Unit=server-reboot.service
[Install]
WantedBy=timers.target
Then load and enable it:
sudo systemctl daemon-reload
sudo systemctl enable --now server-reboot.timer
systemctl list-timers server-reboot.timer
Check the timer’s next and last activation times, and test the service only during an approved window. A persistent timer deliberately changes the behavior described for cron: if 03:00 is missed, systemd may activate the service after boot. Confirm that this is acceptable before enabling it on a host that can experience long outages.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Troubleshoot a cron reboot that did not happen
The entry is in the wrong crontab
If you used crontab -e as a normal account, the job belongs to that account and may not have permission to reboot. Reopen root’s file with sudo crontab -e, then confirm it with sudo crontab -l.
The command works interactively but not from cron
Replace a bare shutdown command with its absolute path. Check wrapper scripts for relative paths, shell assumptions, missing permissions, and environment variables that exist in your login shell but not in cron.
Best Value
- 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
- 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
- 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
- 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
- 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.
The time is wrong
Compare the intended maintenance timezone with timedatectl output. Remember that cron uses the host’s configured timezone and does not apply a separate business-timezone conversion.
No evidence exists in the logs
Add the redirection example, inspect the cron journal around the scheduled minute, and check last reboot. Verify that the cron daemon is running and that the crontab was accepted after saving. A reboot can cut off the session before interactive output is visible, which is why persistent logs and post-boot checks matter.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Services fail after the reboot
The cron line only requests a reboot; it does not repair applications that are not boot-enabled. Check each critical service’s enablement, startup dependencies, mounted storage, network requirements, and recovery behavior. Drain or stop stateful workloads cleanly before the scheduled event.
Quick Recap
Operational checklist
- Confirm the reboot is necessary and define an approved maintenance window.
- Notify users and drain workloads that cannot tolerate an abrupt restart.
- Check the server timezone with
timedatectl. - Find the executable with
command -v shutdown. - Edit root’s crontab using
sudo crontab -e. - Use an absolute path and verify the result with
sudo crontab -l. - Test the exact command manually before the first unattended run.
- Redirect output or otherwise retain cron and journal evidence.
- After the window, confirm the event with
last rebootand service health checks. - If missed executions must be replayed, use a tested persistent systemd timer instead of ordinary cron.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

