@twin3/scron

1.0.10 • Public • Published

Scron is a light-weight JavaScript library providing scheduling functionality for calculating next run times, providing user-friendly next run descriptions, and run now callback functionality.

  • [x] Replace your existing giant schedule capture form full of calendars and time inputs (each with their own annoying set of validation rules) with a single input field.
  • [x] User friendly Wiki you can direct your users to in order to help them easily understand how to become a Scron pro
  • [x] Run on your websites, servers or JS-based applications (needs to be ES6 compatible one way or another)
  • [x] No additional dependencies! The project is entirely self contained!
  • [x] Can be used just for its date-formatting functionality!

If you're looking for help with this library either integrating into your own project or are looking for assistance in understanding how to write a Scron formula, then please jump over to the Wiki which we are continuously improving to provide the best help we can achieve.

Best Bits

  • [x] Easy to enter formula (and very familiar for Cron users!)
  • [x] Supports months and days of the week to be entered as words instead of integers (eg- "Monday" or "Mon")
  • [x] Get the next run time as a Javascript Date object
  • [x] Get the next run time as a user friendly description
  • [x] Run now functionality directly in your Javascript
  • [x] Supports milliseconds, seconds, minutes, hours, day of the month, month, day of the week, start date, end date and max run limits.
  • [x] The package uses no additional dependencies, everything is within a single class making it more slimline and easier to maintain
  • [x] Wiki written to help developers integrate and users use.
  • [x] Built in date-to-string formatter

How To Use/Install

If you're looking to implement into your project you can either grab a copy of the minified or unminified JS class from the lib folder to include in your project, or you can use npm to install in your project using:
npm install --save @twin3/scron

If you're an end-user looking to understand how to write a Scron for entering into a system utilising Scron then you can jump over to the Wiki to learn the basics. The Wiki is continuously being updated but if you feel something doesn't quite make sense or you've found a statement that is incorrect or outdated please let us know by raising an issue or help us out by correcting yourself!

Bugs + Feedback

If you experience any bugs, have any questions or suggestions, then please raise a new Github Issue.

Licence

Scron uses the MIT License. The MIT license permits reuse within proprietary software provided that all copies of the licensed software include a copy of the MIT License terms and the copyright notice. This means you're free to use Scron completely for free providing you keep the license attached, this includes for commercial and for-profit use.

Package Sidebar

Install

npm i @twin3/scron

Weekly Downloads

0

Version

1.0.10

License

MIT

Unpacked Size

24.5 kB

Total Files

6

Last publish

Collaborators

  • npalethorpe