Quartz / Unix Cron expressions
Get StartedAs simple as Angular. Nothing else. The Bootstrap CSS is a optional dependency.
You can customize the component as you want.
Use it directly in your project using npm.
Editing a plain text crontab is error-prone for task management, such as adding tasks, deleting tasks, or pausing tasks.
A little error can undoubtedly cut down every one of the positions and could set you back a great deal of time.
Angular cron widget allows you to create a cron expression string without any experience or understanding of cron standards.
This library contains solutions for quartz and unix formats.
Use with bootstrap CSS framework 5 or 4. npm i @sbzen/ng-cron
yarn add @sbzen/ng-cron
Quartz cron expression is a representation of 7 values divided by single space.
Each value may have its own expression, such as 1-2, or 1,2 with various combinations of special characters.
Create a quartz cron expression with an easy-to-use online interface.
Seconds | Minutes | Hours | Day Of Month | Month | Day Of Week | Year |
---|---|---|---|---|---|---|
0 | 40 | 7 | ? | * | MON-FRI | * |
@Component({
template: `
<input
class="form-control"
readonly
[value]="quartzValue">
<bs5-quartz-cron
name="cron"
[(ngModel)]="quartzValue">
</bs5-quartz-cron>
`
})
export class MyComponent {
quartzValue = '0 40 7 ? * MON-FRI *';
}
import { Bs5QuartzCronModule } from '@sbzen/ng-cron';
@NgModule({
imports: [Bs5QuartzCronModule]
})
Unix cron expression supports 5 values divided by single space.
Same as quartz format, each value may have special characters and combinations.
This library helps you generate unix cron expressions to schedule tasks such as backups, emails, api calls and status checks.
Minutes | Hours | Day Of Month | Month | Day Of Week |
---|---|---|---|---|
0,2 | */1 | */4 | */4 | ? |
@Component({
template: `
<input
class="form-control"
readonly
[value]="unixValue">
<bs5-unix-cron
name="cron"
[(ngModel)]="unixValue">
</bs5-unix-cron>
`
})
export class MyComponent {
unixValue = '0,2 */1 */4 */4 ?';
}
import { Bs5UnixCronModule } from '@sbzen/ng-cron';
@NgModule({
imports: [Bs5UnixCronModule]
})
We do support version 4 and 5, but you should use different components and modules.
These versions are not fully compatible with each other and this has led us to separate implementations.
Since version 4 is initial you can just use unix-cron
and quartz-cron
to work with bootstrap 4 like before.
And if you need bootstrap 5 use bs5-unix-cron
, bs5-quartz-cron
.
All texts presented in cron generator are taken from localization scheme which defaults to English.
This approach provides flexibility in redefinition of texts.
Use localization
input to pass your texts version.
The unix format restricts us from adding any extensions other than those described in the standard.
It supports 5 value segments, which are minutes, hours, day of month, month and day of week.
To comply with standards, seconds and years can't be added to unix component.
These components are designed to be ready for any style changes.
They are covered by an inner class schema that can't be changed, such classes are prefixed with c-
and you can inspect them.
They are stable and you can use them to add your own corrections or re-styling.
There is no options to disable year or other segment.
There's only one way we can do this restriction is to specify which tabs you want to show in UI and simply not show tabs you want to disallow.
Pass the desired tabs to tabs
input and viewing will be restricted.
The main thing here is not to integrate with external js, any other css solutions are welcome.
There is a list of potential candidates: Foundation, tailwindui, Semantic UI, Materialize, UI Kit.