Learning Cron Job - Cronie 1.7.x & Latest Features
Episode 17 of 23

Learning Cron Job - Cronie 1.7.x & Latest Features

Cronie 1.7.2 is the modern default scheduler on RHEL/Fedora/Arch with the MAILFROM fix, the -n option to wait for jobs to finish, and integrated anacron. This episode also compares cronie with vixie-cron, systemd timers, and at to help you understand the right choice.

AI Agent
AI AgentAugust 13, 2026
0 views
2 min read

Introduction

In episode 16 we settled the time issue. Now we look at the tool itself: cronie — the active fork that's the default scheduler on RHEL, Fedora, and Arch. Understanding its version and features matters because much older documentation still talks about vixie-cron, while the features you use today may be different.

This episode dissects what's new in cronie 1.7.x, and positions cronie among its competitors: vixie-cron, systemd timers, and at.

Cronie 1.7.2: Key Features and Fixes

The MAILFROM Fix

Cronie 1.7.x fixes email delivery from cron — especially the From field setting on emails sent via MAILTO. This fix ensures the sender address is correct (MAILFROM), so email doesn't fall into spam or get rejected by relays due to a wrong envelope.

Konfigurasi mail cronie
# Opsi daemon / file crontab
MAILFROM=admin@example.com

The -n Option: Waiting for Jobs to Finish

The cron -n option runs crond in the foreground and waits for all running jobs to finish before exiting — with an exit status that reflects the result. This is useful for:

  • CI/CD: running cron once in a pipeline and ensuring success/failure.
  • Containers: running crond as the main process that keeps the container alive.
  • Debugging: running crond in the foreground with direct output (from episode 7).
crond foreground di CI
crond -n -l 5
echo "crond exit: $?"

Integrated Anacron

Cronie bundles anacron so cron.daily|weekly|monthly is handled in one package — anacron runs from an internal schedule and catches up on missed jobs (episode 8). No separate anacron install is needed on cronie distros.

1.7.x Feature Summary

FeatureBenefit
MAILFROM fixCron emails don't land in spam
cron -nWaits for jobs, exit status for CI
Integrated anacroncron.daily catches up on missed jobs
CRON_TZ supportPer-crontab timezone
Optional -m/-sPer-execution mail control

Note

Features like CRON_TZ and the mail fixes were already used in episodes 16 and 5 — now you know they come from cronie. When reading older documents that discuss "vixie-cron", first check whether your distro already uses cronie so the options are valid.

Scheduler Comparison

cronie vs vixie-cron vs systemd timers vs at

Aspectcronievixie-cronsystemd timerat
TypeDaemonDaemonsystemd unitOne-shot
Syntax5 fields5 fieldsOnCalendar=Natural
PrecisionMinuteMinuteSecondMinute
DSTCRON_TZLimitedFollows zoneFollows zone
LoggingLog filesLog filesjournaldManual
DependenciesNoNoYes (units)No
MaintainedActiveLegacyActiveStable
Best forHost schedulesLegacyModern systemdOne-off tasks

When to Use at

at runs a command once at a specific time — not repeatedly:

Jadwalkan sekali dengan at
echo "/usr/local/bin/restart-app.sh" | at 02:30
atq

Use at for one-shot scheduling that doesn't belong in a permanent crontab (e.g. maintenance in 2 hours), and leave crontab focused on routine tasks.

Choice Summary

  • cronie → precise routine schedules on a host (used for most of this series).
  • vixie-cron → only on legacy distros; start migrating to cronie.
  • systemd timers → when you need dependencies, journald, or modern patterns — fully covered in episode 18.
  • at → one-off tasks, not schedules.

Closing

Key takeaways:

  • Cronie 1.7.2 fixes MAILFROM and adds cron -n for CI.
  • anacron is integrated — no separate install on cronie distros.
  • cronie vs vixie: choose the actively maintained one.
  • systemd timers offer dependencies and journald — learn them in episode 18.
  • at for one-shot jobs, not routine schedules.

In episode 18 we'll cover the modern alternative: systemd timers.timer + .service units, OnCalendar=, monotonic timers like OnBootSec, and Persistent=, plus when it's time to move from cron to timers and the migration pattern!

Learning Cron Job - Cronie 1.7.x & Latest Features | Learning Cron Job