Cron Expression
Cron Form

Display and edit cron expression.
Import

NG-ZORRO experiments are features that are released but not yet considered stable or production ready

Developers and users can opt in into these features before they are fully released. But breaking changes may occur with any release.

When To Use#

When you want to use cron expression in Angular.

Examples#

2026-09-22 03:32:00


2026-09-22 03:32:00

The simplest usage.

      Loading...
    
2026-09-22 03:32:00
2026-09-22 03:32:00
2026-09-22 03:32:00

There are three sizes of an CronExpression box: large (40px)、default (32px) and small (24px).

      Loading...
    
2026-09-22 03:32:00

Borderless.

      Loading...
    
2026-09-22 03:32:00
2026-09-22 03:32:00

There are two rule types of an CronExpression box: nzType="linux" (five-segment) andnzType="spring" (six-segment).

      Loading...
    

Use nzCollapseDisable to hide collapse panel.

      Loading...
    
2026-09-23 01:01:00

cron: 1 1 * * *

Use nzExtra to specify the content on the right.

      Loading...
    
Next Time: 2026-09-22 04:10:00

Custom rendering next execution time.

      Loading...
    
2026-09-23 01:00:00
2026-09-23 01:00:00
The interval cannot be less than 1 day.

<nz-cron-expression formControlName="cron" />

      Loading...
    
22.1.0
2026-09-22 03:32:00
2026-09-22 03:32:00

Add status to Cron Expression with nzStatus, which could be error or warning.

      Loading...
    
22.1.0

API#

Install cron-parser in your project first:

npm install cron-parser@^5.5.0

nz-cron-expression#

ParameterDescriptionTypeDefaultVersion
[nzType]Cron rule type'linux'|'spring'linux
[nzDisabled]Disablebooleanfalse
[nzBorderless]Whether to hide the borderbooleanfalse
[nzSize]The size of the input box.'large'|'small'|'default'default
[nzStatus]Set validation status'error'|'warning'-22.1.0
[nzCollapseDisable]Hide collapsebooleanfalse
[nzExtra]Render the content on the rightTemplateRef<void>-
[nzSemantic]Custom rendering next execution timeTemplateRef<void>-

Note#

Supported format#

*    *    *    *    *    *
┬    ┬    ┬    ┬    ┬    ┬
│    │    │    │    │    |
│    │    │    │    │    └ day of week (0 - 7, 1L - 7L) (0 or 7 is Sun)
│    │    │    │    └───── month (1 - 12)
│    │    │    └────────── day of month (1 - 31, L)
│    │    └─────────────── hour (0 - 23)
│    └──────────────────── minute (0 - 59)
└───────────────────────── second (0 - 59, optional)