View on GitHub

CronUI

Download this project as a .zip file Download this project as a tar.gz file

Cron UI

CronUI provides a simple easy-to-use form for users to specify recurrent events, translated to cron strings.

CronUI is an adaption of the jquery-cron project.

CronUI is completely standalone and has no dependencies.

Usage

          
// Create the ui by initiating new instance of `CronUI`.
// Pass in an element selector or DOM element by itself to render
// the form in, and options object.
recurrentEventForm = new CronUI('.container', {initial: '* * * * *'});
// With DOM element
var el = document.querySelector('.my-container');
new CronUI(el, {initial: '0 5 * * *'});
          
        

Examples

Every
Once changed, the new cron string will be here.
          
Every <span id="cronui-example"></span>
<div id="cronui-example-exported-string">Once changed, the new cron string will be here.</div>

<script>
  var example = new CronUI('#cronui-example', {
    initial: '15 12 * * *',
    changeEvent: function(cronString) {
      document.querySelector('#cronui-example-exported-string').innerHTML = cronString;
    }
  });
</script>
          
        

Functionality

Currently CronUI only supports a subset of cron abilities.

These are the possible combinations so far: