EST. 2026 — Notes from real server work SYSADMIN · SECURITY · AI · DIRECTADMIN Issue 01
THE SYSADMIN ALMANAC
Home / Tags / Cron
Cron

#Cron

20 articles
Monitoring
The Monitor That Hammered Devices Until the Whole Farm Went Down
Linux

The Monitor That Hammered Devices Until the Whole Farm Went Down

A monitoring loop that runs every 30 seconds and tries to recover every device that fails a ping sounds useful, until one device hangs and gets hammered repeatedly until the whole bus goes down. This article walks through ruling out hardware, tracking what was accessing the devices, and the settings that fixed it.

#monitoring#linux#python#systemd
10 min read·17 Oct
No kWh Meter? Estimate Daily Electricity Costs from Current
Hardware

No kWh Meter? Estimate Daily Electricity Costs from Current

Notes on converting CT current readings into energy usage and daily time-of-use electricity costs, from the three-phase power formula and the sampling interval built into it, through skipping outages and separating peak from off-peak with epoch arithmetic, to a daily summary table that made the web page seven times faster.

#energy#power-meter#electrical#modbus
10 min read·15 Oct
Ingesting Mail Without Disrupting Someone Else's Mailbox
Linux

Ingesting Mail Without Disrupting Someone Else's Mailbox

The mailbox the app fetches from is one people actually use every day — fetching with UNSEEN silently misses mail when the owner reads it on their phone before cron runs. The right approach is UID SEARCH paired with UIDVALIDITY and BODY.PEEK, with deduplication handled on our side.

#mail#imap#pop3#dovecot
10 min read·13 Oct
Reads from a Replica Must Show How Many Minutes Old the Data Is
Linux

Reads from a Replica Must Show How Many Minutes Old the Data Is

replication can report a lag of 0 seconds while the data is stuck at yesterday, because these two signals measure different things — how to set up a monitor that checks both Seconds_Behind_Master and business data freshness, catches anyone writing directly to the slave, and has another check watching the monitor itself

#mariadb#mysql#monitoring#alerting
9 min read·12 Oct
The App Uses UTC, People Use Thai Time — 7 Hours Off, No Errors
Linux

The App Uses UTC, People Use Thai Time — 7 Hours Off, No Errors

Scheduled for three in the afternoon, published at ten at night. No errors, nothing wrong in the logs, because the app stores UTC while the person entering the time thinks in Thai time. This article traces the issue from an env setting that has no effect to the single line that writes Thai wall-clock time into a column everyone reads as UTC.

#laravel#php#mariadb#debugging
9 min read·11 Oct
The Service Is Running but Dead — systemd restart Cannot Help
Linux

The Service Is Running but Dead — systemd restart Cannot Help

A long network outage broke DNS. A daemon holding a session with an external API failed to log in 194 times, then hung halfway through the process. It never exited, so the system never restarted it — why I stopped checking whether a process was alive and started measuring data freshness instead.

#systemd#linux#monitoring#alerting
9 min read·9 Oct
A 25-Hour Power Outage Left Scheduled Jobs Missing
Linux

A 25-Hour Power Outage Left Scheduled Jobs Missing

The machine running my automated jobs lost power three times in three days, with the longest outage lasting 25 hours. When it came back, I found that jobs scheduled directly through Task Scheduler had skipped their runs entirely, while jobs managed by a dispatcher that checked the time itself had all caught up. This article covers the setting to enable, what to avoid during recovery, and the traps that led me to misread the status.

#windows#scheduler#automation#powershell
9 min read·22 Sep
Every Layer Reported Success While the Output Was Garbage
Linux

Every Layer Reported Success While the Output Was Garbage

In one day, four layers of the same automated pipeline failed together, but every layer reported success without a single error line. The person who caught it was a user who said the site was not updating. These are the rules I wrote afterward so that failing stages could speak up for themselves.

#automation#python#monitoring#debugging
10 min read·15 Sep
Every File Is Backed Up, but I Still Can't Rebuild the Server
Backup

Every File Is Backed Up, but I Still Can't Rebuild the Server

The database dump is complete, the code tar is complete, and all the secrets are there, but put them on a blank machine and the site will not come up, because the things that actually make the server work were never in the backup files. This article lists what disappears with the machine and the recovery sequence I wrote for my future self.

#backup#disaster-recovery#systemd#debian
11 min read·12 Sep
Backups Succeeded Nightly, but Offsite Uploads Failed for 3 Weeks
Backup

Backups Succeeded Nightly, but Offsite Uploads Failed for 3 Weeks

cron ran every night, local files were complete every day, and the log said done, but offsite storage had not changed for 3 weeks. The first 8 nights of backups were already gone for good because local rotation had deleted them first. This article examines the two gaps that let the failure stay silent for so long.

#backup#rclone#s3#cloudflare
10 min read·11 Sep
The Web User's crontab Isn't the One Running Your Jobs
Linux

The Web User's crontab Isn't the One Running Your Jobs

Schedule changes saved through the web still leave jobs running at the old times because the script writes the web user's crontab, not the user’s crontab that cron actually reads. How to spot it in 3 commands, the sudoers drop-in I used, and how to design it so this cannot happen again.

#cron#linux#sysadmin#debugging
7 min read·19 Aug
Laravel Queues on Shared Hosting — Don't Share Redis with Cache
Linux

Laravel Queues on Shared Hosting — Don't Share Redis with Cache

If you're enabling queues for Laravel on shared hosting and planning to separate the queue from cache with different REDIS_DB numbers, that won't help. maxmemory and eviction apply to the whole instance, not individual DBs. This article explains why I chose the database driver instead, with complete systemd units to replace Supervisor.

#laravel#redis#queue#systemd
10 min read·17 Aug
My Firewall Permanently Banned Googlebot and Hid Sites from Search
Security

My Firewall Permanently Banned Googlebot and Hid Sites from Search

I investigated why sites disappeared from search results and found Googlebot in my own firewall's permanent ban list. 408 of 500 entries came from the counter tallying WAF false positives. How I lifted the bans, wrote a script to fetch official bot IP ranges into the ignore list daily, and dealt with a grep trap and the side effects of blocking entire countries.

#csf#firewall#seo#googlebot
10 min read·14 Aug
Factory to Cloud Behind NAT: Push Snapshots and a Command Queue
Network

Factory to Cloud Behind NAT: Push Snapshots and a Command Queue

The production machine sits in a LAN behind NAT with no public IP, but the owner wants to view data on a cloud website and make edits from a phone that reach the internal machine — possible without opening ports or setting up a VPN, using push snapshots + an edit command queue + idempotent acks

#automation#networking#nat#api
10 min read·9 Aug
One Query Hung for 54 Minutes, Causing Sitewide 504s via MyISAM Locks
Linux

One Query Hung for 54 Minutes, Causing Sitewide 504s via MyISAM Locks

A single 30 MB table caused 504s on every page across the site, even with 9.5 GB of RAM still free — I traced information_schema.PROCESSLIST to a single SELECT that had been stuck for 54 minutes on a MyISAM table, cascading into metadata locks across the server, with an immediate fix and ways to prevent it from happening again.

#mariadb#mysql#myisam#innodb
10 min read·6 Aug
Set DirectAdmin Admin Backup Cron from the CLI Without the Panel
DirectAdmin

Set DirectAdmin Admin Backup Cron from the CLI Without the Panel

CMD_ADMIN_BACKUP takes five steps to set up a cron job, but DirectAdmin actually just appends one line to backup_crons.list and lets dataskq pick it up. Here is how to write directly to the file from the CLI, including common traps with when=now, base64, and append_to_path.

#directadmin#backup#automation#cron
8 min read·24 Jul
Off-Site Backups with Pull Architecture + rclone/rsync
Backup

Off-Site Backups with Pull Architecture + rclone/rsync

Add off-site Layer 3 to complete 3-2-1 with pull architecture (the destination host fetches the data), rclone + rsync, and lessons from real pitfalls involving NAT, RSA host keys, cwRsync, and PID recycling.

#backup#offsite#disaster-recovery#rclone
12 min read·28 May
Rebuilding DirectAdmin Backups with NFS and POSIX ACL in Production
Backup

Rebuilding DirectAdmin Backups with NFS and POSIX ACL in Production

A record of rebuilding backups on a DirectAdmin server after migrating to a new machine — from FTP push that broke at three layers to an NFSv4 hard mount + POSIX ACL, with kernel-level lessons learned along the way.

#backup#nfs#posix-acl#directadmin
13 min read·28 May
Per-User Redis on DirectAdmin Without Buying pro_pack
DirectAdmin

Per-User Redis on DirectAdmin Without Buying pro_pack

How to set up per-user Redis object cache on DirectAdmin shared hosting with a systemd template + unix socket + cgroup limit, using a custom provisioning script instead of the DA panel that requires a pro_pack license, with connection recipes for WordPress, Flarum, and Laravel

#redis#cache#directadmin#shared-host
12 min read·20 May
Tuning ModSecurity on DirectAdmin for Shared Hosting
Security

Tuning ModSecurity on DirectAdmin for Shared Hosting

The 4 additions I made beyond DA defaults — exclusions before CRS, a 1-hit credscan ban, a fix for the incorrect MODSEC_LOG path shipped by DA, and a self-heal cron to recover from rebuild overwrites

#modsecurity#csf#directadmin#custombuild
11 min read·20 May