Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@breejs/later

Package Overview
Dependencies
Maintainers
5
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@breejs/later

Maintained fork of later. Determine later (or previous) occurrences of recurring schedules

  • 4.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
169K
increased by3.71%
Maintainers
5
Weekly downloads
 
Created

What is @breejs/later?

@breejs/later is a scheduling library for JavaScript that allows you to define complex schedules using natural language or cron-like syntax. It is useful for tasks that need to be executed at specific times or intervals.

What are @breejs/later's main functionalities?

Basic Scheduling

This feature allows you to define a schedule using natural language and execute a function at the specified intervals.

const later = require('@breejs/later');

// Define a schedule to run every 5 minutes
const sched = later.parse.text('every 5 mins');

// Execute a function based on the schedule
later.setInterval(() => {
  console.log('This runs every 5 minutes');
}, sched);

Cron Scheduling

This feature allows you to define a schedule using cron syntax, which is useful for more complex scheduling needs.

const later = require('@breejs/later');

// Define a schedule using cron syntax
const sched = later.parse.cron('0 0 * * *'); // Every day at midnight

// Execute a function based on the schedule
later.setInterval(() => {
  console.log('This runs every day at midnight');
}, sched);

Custom Intervals

This feature allows you to define custom intervals for scheduling tasks, providing flexibility for various use cases.

const later = require('@breejs/later');

// Define a custom schedule
const sched = later.parse.recur().every(2).hour().first().minute();

// Execute a function based on the custom schedule
later.setInterval(() => {
  console.log('This runs every 2 hours at the first minute');
}, sched);

Other packages similar to @breejs/later

Keywords

FAQs

Package last updated on 28 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc