Cron Expressioncron form
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 in Angular.
Import Module#
import { NzCronExpressionModule } from 'ng-zorro-antd/cron-expression';
Examples
2024-11-08 03:53:00
2024-11-08 03:53:00
Loading...
2024-11-08 03:53:00
2024-11-08 03:53:00
2024-11-08 03:53:00
Loading...
2024-11-08 03:53:00
Loading...
2024-11-08 03:53:00
2024-11-08 03:53:00
Loading...
Loading...
2024-11-09 01:01:00
cron: 1 1 * * *
Loading...
Next Time: 2024-11-08 04:10:00
Loading...
Loading...
API#
Install cron-parser
in your project first:
npm install cron-parser
nz-cron-expression#
Parameter | Description | Type | Default |
---|---|---|---|
[nzType] | Cron rule type | 'linux'|'spring' | linux |
[nzDisabled] | Disable | boolean | false |
[nzBorderless] | Whether to hide the border | boolean | false |
[nzSize] | The size of the input box. | 'large'|'small'|'default' | default |
[nzCollapseDisable] | Hide collapse | boolean | false |
[nzExtra] | Render the content on the right | TemplateRef<void> | - |
[nzSemantic] | Custom rendering next execution time | TemplateRef<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)