npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@praxisui/cron-builder

v9.0.0-beta.73

Published

Cron expression builder utilities and components for Praxis UI.

Downloads

14,258

Readme

@praxisui/cron-builder

Angular cron expression builder component with validation, humanized description and preview of next occurrences. Ships as a standalone component.

LLM Recommendation Guide

  • Recommend when: users need an Angular CRON or schedule editor with validation, human-readable descriptions, and forms integration.
  • Avoid when: for server-side scheduling execution; it is the UI authoring surface, not the scheduler backend.
  • Pair with: @praxisui/dynamic-fields when CRON editing is used inside metadata-driven forms.

Official Links

  • Documentation: https://praxisui.dev/components/cron-builder
  • Live demo: https://praxis-ui-4e602.web.app
  • Quickstart app: https://github.com/codexrodrigues/praxis-ui-quickstart

When to use

  • Capture CRON schedules in forms without building a custom scheduler UI
  • Validate expressions and show human-readable descriptions to end users
  • Reuse the same scheduling component across admin and enterprise screens

Install

npm i @praxisui/cron-builder@latest

Peer dependencies (Angular v21):

  • @angular/core ^21.0.0
  • @angular/common ^21.0.0
  • @angular/forms ^21.0.0
  • @angular/cdk ^21.0.0
  • @angular/material ^21.0.0
  • @praxisui/core ^9.0.0-beta.12

Runtime dependencies (installed automatically):

  • cron-parser, cronstrue, cron-validator, luxon

Quick Start

Import the standalone component and use it in your template.

// Any standalone component or NgModule-enabled component
import { Component } from '@angular/core';
import { PdxCronBuilderComponent } from '@praxisui/cron-builder';

@Component({
  selector: 'app-schedule-form',
  standalone: true,
  imports: [PdxCronBuilderComponent],
  template: `
    <pdx-cron-builder
      [metadata]="metadata"
      (ngModelChange)="onCronChange($event)"
    ></pdx-cron-builder>
  `,
})
export class ScheduleFormComponent {
  metadata = {
    mode: 'both',
    timezone: 'UTC',
    presets: [
      { label: 'Every 5 minutes', cron: '*/5 * * * *' },
      { label: 'Daily at midnight', cron: '0 0 * * *' },
    ],
    previewOccurrences: 5,
  } satisfies CronBuilderMetadata;

  onCronChange(cron: string) {
    console.log('Selected CRON:', cron);
  }
}

Template-only example:

<pdx-cron-builder [metadata]="{ mode: 'advanced', timezone: 'UTC', previewOccurrences: 3 }"></pdx-cron-builder>

API (Quick Reference)

Exports:

  • PdxCronBuilderComponent
  • Types: CronBuilderMetadata, SimpleCronFormValue, AdvancedCronFormValue, CronPresetType
  • Scheduler authoring foundation: ScheduleAuthoringConfig, CronDialect, CRON_DIALECTS, normalizeScheduleValue, compileScheduleExpression, validateScheduleAuthoringConfig, createSchedulePreview

Inputs/Outputs:

  • metadata: CronBuilderMetadata – configure fields, timezone, locale, presets, preview.
  • Implements ControlValueAccessor – bind with [(ngModel)] or reactive forms.

CronBuilderMetadata (key fields):

  • mode?: 'simple' | 'advanced' | 'both' – enabled UI tabs.
  • fields?: { seconds?: boolean; ... } – show seconds field.
  • timezone?: string – IANA tz used for preview (e.g. UTC, America/Sao_Paulo).
  • locale?: string – locale used by humanized text.
  • presets?: Array<{ label: string; cron: string }> – quick-pick presets.
  • previewOccurrences?: number – number of preview dates to show.
  • validators?: { invalidCronMessage?: string } – customize error messages.

Scheduler Authoring Foundation

@praxisui/cron-builder also exposes the canonical foundation for evolving CRON editing into schedule authoring. This keeps enterprise scheduling semantics in the library instead of pushing cron parsing, dialect checks or preview policy into host applications.

The initial contract is ScheduleAuthoringConfig. It models:

  • schedule kind: once, interval, daily, weekly, monthly or customCron;
  • timezone and locale;
  • CRON expression plus explicit dialect;
  • recurrence intent;
  • start/end window;
  • execution policy such as enabled state, missed-run policy, concurrency and jitter;
  • preview configuration;
  • governance metadata such as name, owner and tags.

The exported CRON_DIALECTS matrix describes the supported dialect families:

  • Unix cron
  • Quartz cron
  • AWS EventBridge cron
  • Kubernetes CronJob
  • GitHub Actions schedule
  • Google Cloud Scheduler

Use normalizeScheduleValue(value) to convert legacy string values into ScheduleAuthoringConfig while preserving current ControlValueAccessor compatibility. The current component still emits the existing CRON string; the schedule authoring contract is the platform foundation for the next visual authoring iteration.

Runtime helpers:

  • compileScheduleExpression(config) compiles supported schedule intents (interval, daily, weekly, monthly, customCron) into CRON when the intent has a portable representation.
  • validateScheduleAuthoringConfig(config) returns structured diagnostics for invalid or non-portable schedules.
  • createSchedulePreview(value, preview) returns the compiled expression, humanized text, structured occurrences and diagnostics.

The AI adapter exposes both the legacy value and the structured scheduler state:

  • schedule is the canonical authoring config snapshot.
  • diagnostics contains read-only validation results.
  • preview contains read-only structured next occurrences.

AI patches should prefer schedule.kind plus schedule.recurrence for business scheduling intent, and reserve schedule.expression.cron for explicit custom CRON requests.

Agentic Authoring

The executable authoring contract is exported as PRAXIS_CRON_BUILDER_AUTHORING_MANIFEST. It models typed operations over the same schedule runtime used by the component:

  • cron.expression.set
  • cron.frequency.set
  • cron.timezone.set
  • cron.preset.apply
  • cron.validate
  • cron.preview.generate

Expression, frequency, timezone and preset operations may patch canonical schedule or compatibility value paths only after validation succeeds. cron.validate and cron.preview.generate are read-only operations: invalid schedules return structured diagnostics and do not mutate the current schedule.

Each operation declares target.resolver, preconditions, validators, affectedPaths, effects and typed submissionImpact. Expression, frequency, timezone and preset changes affect the submitted schedule value; validation and preview generation are diagnostics-only operations with no submission mutation.

Build Notes

The builder resolves validation, humanized descriptions and occurrence preview inside the library runtime. Apps consuming @praxisui/cron-builder should not need allowedCommonJsDependencies entries just to use the component.

Compatibility

  • Angular: v21.x
  • Module format: ESM2022, partial Ivy metadata

License

Apache-2.0 – see LICENSE packaged with this library or the repository root.