npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@twin3/scron

v1.0.10

Published

JS ES6 library providing Cron-like scheduling date prediction, formatting and run-now capabilities.

Downloads

3

Readme

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.