Cron Expressioncron 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

2025-08-31 16:13:00


2025-08-31 16:13:00

The simplest usage.

      Loading...
    
2025-08-31 16:13:00
2025-08-31 16:13:00
2025-08-31 16:13:00

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

      Loading...
    
2025-08-31 16:13:00

No bezel.

      Loading...
    
2025-08-31 16:13:00
2025-08-31 16:13:00

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

      Loading...
    

[nzCollapseDisable]="true"

      Loading...
    
2025-09-01 01:01:00

cron: 1 1 * * *

You can use nzExtra to specify the content on the right.

      Loading...
    
Next Time: 2025-08-31 17:10:00

Custom rendering next execution time.

      Loading...
    
2025-09-01 01:00:00
2025-09-01 01:00:00

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

      Loading...
    

API#

Install cron-parser in your project first:

npm install cron-parser

nz-cron-expression#

ParameterDescriptionTypeDefault
[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
[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)