ops utility
cronwtf icon

cronwtf.

explain cron expressions in plain english. preview next runs. catch gotchas before they fire.

handles @daily / @hourly / @yearly aliases and named weekdays/months (MON-FRI, JAN,JUL). warns on impossible dates (Feb 31 never fires), DOM+DOW overlap (OR semantics, not AND), every-minute runs, leap-year-only rules. --freq estimate, --json envelope, diff mode, --validate with CI-friendly exit codes.

npm install -g @v0idd0/cronwtf

what it is

cronwtf is a translation tool for cron expressions. you input a five-part or six-part cron string, and it outputs a human-readable description of the schedule. it also generates a list of the next five exact timestamps when the job will trigger.

writing cron expressions from memory usually results in jobs running at 2 am instead of 2 pm, or running every minute instead of once an hour. timezone offsets make it even worse. cronwtf validates your logic before you commit the schedule to production.

this is for developers and operators who manage background jobs, backups, or scheduled tasks. it catches common syntax mistakes and explicitly handles utc offsets so you know exactly when your script will fire.

core features

+

plain english translation

converts cryptic cron syntax into readable sentences. removes the guesswork from scheduling.

+

next execution preview

calculates and displays the next five exact timestamps the job will run. verifies your logic.

+

timezone awareness

allows you to specify the server timezone. catches offset errors before they cause outages.

+

non-standard syntax support

understands extensions like @reboot, @daily, and @midnight. handles platform-specific quirks.

+

cli integration

validate your crontab files directly from the terminal. integrate it into your deployment checks.

how to use it

translate a confusing cron expression and preview the next runs.

// input

cronwtf '0 12 * * 1-5' --tz 'America/New_York'

// output

runs at 12:00 pm, monday through friday.

next runs:
1. mon, oct 14 12:00:00 edt
2. tue, oct 15 12:00:00 edt

it explained the schedule in english and calculated the exact timestamps for the specified timezone.

why we built it

nobody remembers the exact syntax for a cron expression. you either use an online generator or you guess and hope your backup script does not run every minute instead of once a month.

we caused a minor database outage by messing up a server timezone offset in a cron job. cronwtf was built to explicitly show the next five execution times so you can verify your logic before deploying.

frequently asked questions

does it support six-part cron expressions?

yes. it supports the optional seconds field used by some modern task schedulers.

how does it handle daylight saving time?

if you provide a valid timezone string, it correctly calculates shifts across daylight saving boundaries for the upcoming execution times.

can i pipe a crontab file into it?

yes. the cli can read an entire crontab file, ignore the comments, and translate every active schedule.

is this just a wrapper around existing libraries?

it uses standard cron parsing logic but adds a custom natural language generator designed to be unambiguous.

// stop guessing when your backup script runs.