GithubHelp home page GithubHelp logo

sarfarazansari / angular-cron-generator Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 10.0 29 KB

A cron expression generator for AngularJS. In both format quartz and unix

License: MIT License

JavaScript 60.81% CSS 4.80% HTML 34.39%
cron-jobs cronjob-scheduler angular

angular-cron-generator's Introduction

angular-cron-generator

A cron expression generator for AngularJS. In both format quartz and unix

demo

[demo]https://embed.plnkr.co/LCNjHr1s1rlr1FSXesMg/

Installation

Install using bower:

bower install angular-cron-generator

Use:

Include the component in your application:

angular.module('app', ['angular-cron-generator']);

Insert the directive where you would like it to appear in your application:

<cron-generator ng-model="cronString"></cron-generator>

By setting the ng-model attribute equal to a value in your controller (i.e. $scope.cronString in the example above) you have access to the cron syntax output.

For example, a job selected to run every month on the 11th at 4:10 AM would output the follow:

'10 4 11 * *'

as a string.

Configuration:

The directive takes an optional attribute of config

<cron-selection ng-model="cronString" config="cronConfig"></cron-selection>

allowMultiple

You can also set whether or not you want to allow a user to select multiple values for a cron:

$scope.myConfig = { allowMultiple: true }

Setting allowMultiple to either true or false will toggle the ability.

Quartz

By default, the cron expression generated is Unix Cron compatible. Incase you use the Quartz Scheduler, you would want to enable the quartz mode in the config. You can do so by passing that flag as true in the config object.

$scope.myConfig = { quartz: true }

Coming Soon:

  • Test cases
  • code optimize
  • and hell yeah Support!

Contribution

Any help or suggestion would be appreciated. you can contribute creating a separate branch and specific commit message and raise a PR.

After run bower and npm commands. run gulp dev

Contribution

MIT

Free Software, Hell Yeah!

angular-cron-generator's People

Contributors

sarfarazansari avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

angular-cron-generator's Issues

Month Names Issue

Drear team,
Month selection is not working properly . If i select January is generating expression as FEB ,
feb selection to march cron , current selection generation next month cron expression .

Thanks & Reagrds
Prathap

Can I init value

if my $scope.test have value, then cron-generator still show the select as $scope.test is not set

Need npm package for angular-cron-generator

We have implemented this in our project with bower. Now we are moving on webpack. So want to eliminate the bower completely. But due this package we not able to do the same.

Any will be appreciated. Thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.