CronEditor
Description
A component to edit cron expressions
CronEditor allows users to schedule tasks using a simplified UI for daily schedules, with a fallback to raw cron expressions for advanced users.
API reference
public sealed class CronEditor : ComponentBase<CronEditor, HTMLDivElement>, IObservableComponent<(string cron, bool enabled)>A structured editor for cron expressions, exposing the schedule fields (minutes, hours, day-of-month, month, day-of-week) as separate inputs.
Constructors
Properties
Methods
public CronEditor DaysEnabled(bool enabled = true)Enables or disables the day-of-week selector in the editor.
public CronEditor ShowEnableCheckbox(bool visible)Shows the enable checkbox.
public CronEditor MinuteInterval(int interval)Sets the minute-step interval used by the editor.
public CronEditor OnChange(ComponentEventHandler<CronEditor> onChange)Registers a callback invoked when the change event fires.
public IObservable<(string cron, bool enabled)> AsObservable()Returns the component's current value as an .
Samples
Basic
With Days Selection Disabled
Custom Interval (30 mins)
With Initial Value (Custom)
Initially Disabled
With Enable Checkbox Hidden
Observable
Preset Schedules with Description
Use buttons to seed the editor with common schedules (hourly, daily, weekly, monthly). A live description gives users a human-readable summary of the current expression so they can confirm what they configured.