Skip to content

RajanRastogi/angular-quartz-cron

Repository files navigation

angular-quartz-cron Build Status

This is based on Jacob Carter's project angular-cron-jobs but provides us the Quartz compatible cron instead of the classic cron syntax.

Update:

All the capabilities of this project have been merged into the angular-cron-jobs project, which adds a lot of features to the module. I would highly recommend using the angular-cron-jobs module over this one.

Demo:

Play around with the demo.

Installation:

You can easily get the project using bower.

bower install angular-quartz-cron

Usage:

Include the component in the app:

    angular.module('my-app', ['angular-quartz-cron'])

Insert the directive:

    <quartz-cron-selection></quartz-cron-selection>

You can interact with the directive using the following attributes:

  • output
  • init(optional)
  • template(optional)
  • config(optional)

output

Binds the output cron generated by this directive to the provided variable.

init

Lets you initialize the UI based on the cron string provided. It can be set after the directive has loaded.

template

Lets you use custom templates. It should be set to the url of the custom template you are trying to use.

config

This is an object in your controller you can use to remove options from the user. For example if you would like the user to be able to set Minute, Hour, and Day but not Week, Month, and Year you would create the following object in your controller:

$scope.myConfig = {
    options: {
        allowWeek : false,
        allowMonth : false,
        allowYear : false
    }
}

Currently the config object accepts an options property with an object of allowed selections. These include:

  • allowMinute
  • allowHour
  • allowDay
  • allowWeek
  • allowMonth
  • allowYear

Setting the keys as booleans will turn the selection on and off.

About

A component for generating quartz compatible cron strings

Resources

License

Stars

Watchers

Forks

Packages

No packages published