Two schedules misbehave: `*/90 * * * *` runs every hour, not every 90 minutes, and `0 3 1-7 * 1` ("first Monday of the month") runs every Monday and on days 1 to 7.
IntermediateTroubleshootingTroubleshooting: cron and systemd timers
Answer
Likely causes → Steps apply within a field's range: */90 in the minute field (0–59) matches only minute 0, so it fires hourly. And when both day-of-month and day-of-week are restricted, cron runs when either matches (OR, not AND).
Diagnose → Read the schedule as cron does, field by field; for timers, systemd-analyze calendar prints the next real trigger times.
Fix → Express intervals that do not divide an hour in hours or use a timer; do the "first Monday" check in the command:
# every 90 min: two lines
0 0,3,6,9,12,15,18,21 * * * /opt/job.sh
30 1,4,7,10,13,16,19,22 * * * /opt/job.sh
# first Monday at 03:00
0 3 1-7 * * [ "$(date +\%u)" = 1 ] && /opt/job.sh
With systemd: OnCalendar=Mon *-*-01..07 03:00:00 (systemd ANDs weekday and date) or OnUnitActiveSec=90min.
Prevent → Verify schedules before deploying (systemd-analyze calendar --iterations=5 '...'), and comment every cron line with its intent in plain English.
More on Troubleshooting: cron and systemd timers
A new job in `/etc/cron.d/opskit` never runs. Syslog shows `cron[812]: (*system*opskit) ERROR (Missing newline before EOF, this crontab file will be ignored)`.BeginnerYou copied a line from `crontab -e` into `/etc/cron.d/backup`, and syslog shows `Error: bad username; while reading /etc/cron.d/backup`. Meanwhile a teammate's user crontab mails `/bin/sh: 1: root: not found` every night.BeginnerA script works when you run it, but the cron log email says `/opt/opskit/bin/backup.sh: line 22: aws: command not found`.BeginnerThis crontab line never produces a log file, and cron mails `/bin/sh: 1: Syntax error: end of file unexpected (expecting ")")`: `0 2 * * * /opt/backup.sh > /var/log/backup-$(date +%F).log 2>&1`IntermediateA cron job fails intermittently, but there are no emails and no logs. Syslog shows `(CRON) info (No MTA installed, discarding output)`.BeginnerA cron job that runs `docker exec -it db pg_dumpall` fails with `the input device is not a TTY`.Intermediate