Calm motion: animations on this site only fade, with no movement
CronInput
A cron schedule, with the next run times
Edits a schedule for a job, a backup, or a report, in the five-field cron format that servers use. People see the next run times, so they know that the schedule does what they want. For a single date and time, use the date-time picker. For a length of time, use the duration input.
Basic
Times are in your time zone.
0 9 * * 1-5v-modelis the expression: minute, hour, day of the month, month, and day of the week, separated by spaces. Each part has its own field with a visible name.- Each part takes
*, a number, a range1-5, a list1,15, and a step*/15or9-17/2. Sunday is0or7. Names such asMONare not read. When a part is not valid, its field is marked, and a line asks you to check it. - When both day fields are set, a day that matches either one runs, as in most cron programs.
- The next run times show under the fields (
count, default 3,0hides them). They use the date format oflocale. They are read after mount, because the server does not know the time zone of the browser. - The run times are in the time zone of the browser. If your server runs the job in another zone, say so in the description.
blessCronNext(expr, from, count)is exported. Use it to show the next run somewhere else, for example in a table of jobs.- In a field, the field's label names the group and its first part.
- Change the words with
labelsor a label pack: the names of the five parts,next, andinvalid.
Usage
ts
import { BlessCronInput, blessCronNext } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
id | string | — | |
count | number | 3 | how many next run times to show; 0 hides the list |
locale | string | — | for the run times, for example `id-ID` |
disabled | boolean | — | |
labels | Partial<{ minute: string; hour: string; day: string; month: string; weekday: string; next: string; invalid: string; }> | — | |
modelValue | string | "* * * * *" | five fields separated by spaces, for example `0 9 * * 1-5` |
Events
| Name | Payload | Description |
|---|---|---|
update:modelValue | [value: string] |