Under the Hood: The Architecture of Cron Schedule Matrix & Calendar Grid Visualizer
English cron explainers (“At 09:00 on Monday through Friday”) are a mature SERP. Operators still ship overlapping jobs because prose does not show density. A cron schedule visualizer that plots a calendar grid—and optionally a second expression for conflicts—is the differentiator. This crontab tester expands 5-field expressions for the visible month with cron-parser, buckets fire times by local calendar day using Date, and labels the zone with Intl.DateTimeFormat().resolvedOptions().timeZone. No job is registered with a cloud scheduler; there is no crontab upload.
Temporal API is not required; Date in the browser’s local zone matches how most developers read “will this run today.” Month navigation is an integer offset from the current month, not a URL round-trip.
Memory Allocation & Browser Threading Mechanics
Expansion is bounded: the iterator stops at 4,000 instants or when endDate throws. A * * * * * expression would otherwise allocate tens of thousands of Date objects per month and hitch the main thread. The UI grid is always 42 cells (Monday-start padding), so React render cost is constant. Counts live in a map of ISO day to pair of fire counts. Recompute is wrapped in useMemo keyed by both expressions and month offset so typing the second cron does not rebuild unrelated structures twice.
Algorithmic Deep-Dive: Code Snippet & Logical Analysis
function ymd(d) {
return d.getFullYear() + "-" + String(d.getMonth()+1).padStart(2,"0") + "-" + String(d.getDate()).padStart(2,"0");
}
function occurrences(expr, start, end) {
const interval = CronExpressionParser.parse(expr, { currentDate: start, endDate: end });
const dates = [];
try { while (dates.length < 4000) dates.push(interval.next().toDate()); } catch {}
return dates;
}Invalid expressions surface as parser errors in the UI rather than empty calendars that look like “never runs.” Overlap is day-granular: if both jobs fire at least once on that local date, the cell highlights. Exact-timestamp equality would miss 09:00 vs 09:05 jobs that still contend for a mutex. Cell numbers show counts a or a/b so you can see “this weekday is hot” without opening a raw next-run list.
The Local Storage Sandbox & Volatile Data Pipelines
Crontab text is React state. There is no download of a generated crontab unless you copy the input yourself. Memoized arrays of Date are replaced on each successful parse; previous arrays are garbage. No localStorage of expressions, so a shared workstation does not keep production schedules.
Verifying True Privacy: How to Audit Your Browser's Network Tab
F12 → Network → clear. Enter 0 9 * * 1-5 and a second expression, change months. You should see no requests to a “next run” API. Cron visualization is CPU plus heap, not telemetry of your job graph.