Tesserae

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

class

CronEditor

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

Constructor
CronEditor
public CronEditor(string initialCron = "0 12 * * *", bool initialEnabled = true)

Initializes a new instance of this class.

Properties

Property
CronEditor.Value
public (string cron, bool enabled) Value { get ; set ; }

Gets or sets the cron expression and its enabled/disabled state as a tuple.

Methods

Method
CronEditor.DaysEnabled
public CronEditor DaysEnabled(bool enabled = true)

Enables or disables the day-of-week selector in the editor.

Method
CronEditor.ShowEnableCheckbox
public CronEditor ShowEnableCheckbox(bool visible)

Shows the enable checkbox.

Method
CronEditor.MinuteInterval
public CronEditor MinuteInterval(int interval)

Sets the minute-step interval used by the editor.

Method
CronEditor.OnChange
public CronEditor OnChange(ComponentEventHandler<CronEditor> onChange)

Registers a callback invoked when the change event fires.

Method
CronEditor.AsObservable
public IObservable<(string cron, bool enabled)> AsObservable()

Returns the component's current value as an .

Method
CronEditor.Render
public override HTMLElement Render()

Renders the component's root HTML element.

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.

See also

© 2026 Tesserae. All rights reserved.