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

rk-cron

v1.1.1

Published

The Dynamic Cron Scheduler is a simple Node.js package for scheduling tasks using intuitive, natural language terms. This package allows developers to schedule recurring tasks or one-time events using easy-to-understand English phrases, removing the compl

Downloads

191

Readme

Dynamic Cron Scheduler

Description

The Dynamic Cron Scheduler is a simple Node.js package for scheduling tasks using intuitive, natural language terms. This package allows developers to schedule recurring tasks or one-time events using easy-to-understand English phrases, removing the complexity of traditional cron syntax.

Features

  • Natural Language Scheduling: Define schedules using plain English such as "every 1 minute," "on 5th of every month 10:30 PM," or "from 25th March 2024 to 26th March 2024."
  • Dynamic and Flexible: Supports a wide range of scheduling scenarios including intervals, specific dates, and date ranges.
  • No External Dependencies: Built from scratch with no external packages required.

Installation

To install the package, run:

Install the package:

npm install simple-cron

Usage: Here’s how to use the simple-cron in your Node.js application for various scheduling scenarios:

You can enter any numbers for hour minute second date month year

  1. Every Second

parseSchedule('every second', () => console.log('Task executed every second'));

  1. Every 10 Seconds

parseSchedule('every 10 seconds', () => console.log('Task executed every 10 seconds'));

  1. Every 1 Minute

parseSchedule('every 1 minute', () => console.log('Task executed every 1 minute'));

  1. Every 5 Minutes

parseSchedule('every 5 minutes', () => console.log('Task executed every 5 minutes'));

  1. Every 1 Hour

parseSchedule('every 1 hour', () => console.log('Task executed every 1 hour'));

  1. Every 1 Hour and 10 Minutes

parseSchedule('every 1 hour 10 minutes', () => console.log('Task executed every 1 hour and 10 minutes'));

  1. Every 1 Hour, 20 Minutes, and 10 Seconds

parseSchedule('every 1 hour 20 minutes 10 seconds', () => console.log('Task executed every 1 hour, 20 minutes, and 10 seconds'));

  1. On 5th of Every Month

parseSchedule('on 5th of every month', () => console.log('Task executed on the 5th of every month'));

  1. On 5th of Every Month at 10:30 PM

parseSchedule('on 5th of every month 22:30', () => console.log('Task executed on the 5th of every month at 10:30 PM'));

  1. On 5th of Every Month at 10:30:10 PM

parseSchedule('on 5th of every month 22:30:10', () => console.log('Task executed on the 5th of every month at 10:30:10 PM'));

  1. On 25th March 2025 at 10:30 PM

parseSchedule('on 25th March 2025 22:30', () => console.log('Task executed on 25th March 2025 at 10:30 PM'));

  1. From 25th March 2024 to 26th March 2024

parseSchedule('from 25th March 2024 to 26th March 2024', () => console.log('Task executed from 25th March 2024 to 26th March 2024'));

  1. From 25th March 2024 at 10:00 PM to 26th March 2024 at 10:30 PM

parseSchedule('from 25th March 2024 22:00 to 26th March 2024 22:30', () => console.log('Task executed from 25th March 2024 10:00 PM to 26th March 2024 10:30 PM')); License MIT License

Contributions Contributions are welcome! Feel free to open issues or submit pull requests on the GitHub repository.