Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/koss-lebedev/bootstrap-cron-picker
https://github.com/koss-lebedev/bootstrap-cron-picker
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/koss-lebedev/bootstrap-cron-picker
- Owner: koss-lebedev
- License: mit
- Created: 2017-03-17T10:58:25.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-01-10T06:59:21.000Z (almost 6 years ago)
- Last Synced: 2024-10-10T02:30:05.657Z (3 months ago)
- Language: JavaScript
- Size: 31.3 KB
- Stars: 5
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CronPicker
[![Code Climate](https://codeclimate.com/github/koss-lebedev/bootstrap-cron-picker/badges/gpa.svg)](https://codeclimate.com/github/koss-lebedev/bootstrap-cron-picker)
[![npm version](https://badge.fury.io/js/bootstrap-duration-picker.svg)](https://badge.fury.io/js/bootstrap-cron-picker)
[![Bower version](https://badge.fury.io/bo/bootstrap-duration-picker.svg)](https://badge.fury.io/bo/bootstrap-cron-picker)CronPicker is a javascript library that provides easy to use
interface for generating CRON expressions.TODO: add preview gif
## Features
1. Supports multiple CRON formats: crontab (StandardCronFormatter)
and extended format used in Quartz Scheduler (QuartzCronFormatter)
2. Can be initialized with an existing CRON expression## Installation
npm install bootstrap-cron-picker
Using Bower:
bower install bootstrap-cron-picker
## Usage
To attach CronPicker to an input field with id `#cron-picker`:
```javascript
$('#cron-picker').cronPicker();
```You can also initialize CronPicker with existing cron expression.
To do that, simply set value of the HTML input before attaching CronPicker.For advanced usage, you can pass any of the following options:
```javascript
$('#cron-picker').cronPicker({
// time format, either 12 hours or 24 hours (default)
format: '24',
// available formatters:
// - StandardCronFormatter (crontab specification)
// - QuartzCronFormatter (quartz.net specification)
cronFormatter: StandardCronFormatter,
// callback function called each time cron expression is updated
onCronChanged: function (cron) {
console.log(cron);
}
});
```