SkillAgentSearch skills...

Pulse

The modern MongoDB-powered job scheduler library for Node.js

Install / Use

/learn @pulsecron/Pulse

README

<p align="center"> <img src="./pulse.png" width="100" alt="project-logo"> </p> <p align="center"> <h1 align="center">PULSE</h1> </p> <p align="center"> <em>The modern MongoDB-powered job scheduler library for Node.js</em> </p> <p align="center"> <img src="https://img.shields.io/github/license/pulsecron/pulse?style=default&logo=opensourceinitiative&logoColor=white&color=24E0A4" alt="license"> <img src="https://img.shields.io/github/last-commit/pulsecron/pulse?style=default&logo=git&logoColor=white&color=24E0A4" alt="last-commit"> <img src="https://img.shields.io/github/languages/top/pulsecron/pulse?style=default&color=24E0A4" alt="repo-top-language"> <img src="https://img.shields.io/github/languages/count/pulsecron/pulse?style=default&color=24E0A4" alt="repo-language-count"> <p> <p align="center"> <!-- default option, no dependency badges. --> </p>

<br><!-- TABLE OF CONTENTS -->

<p align="center"> <a href="https://docs-pulse.pulsecron.com">Documentation</a> | <a href="https://www.pulsecron.com">Website</a> </p> <details> <summary>Table of Contents</summary><br> </details> <hr>

Overview

Pulse is a new fork of the Agenda project, created as the original project is no longer actively maintained. Positioned as a vital solution in the Node.js ecosystem for job scheduling, the hiatus of Agenda prompted the creation of Pulse. Utilizing MongoDB, Pulse introduces advanced functionalities, improved scalability, and contemporary features to address today’s complex scheduling challenges.

<br/>

Related Projects

  • pulsecron - Event-driven task scheduling management infrastructure
  • nestjs-pulse - official NestJS module for Pulse.

<br/> <br/>

Unique Features in Pulse

  • Latest MongoDB Driver Support: Pulse is fully compatible with the latest MongoDB driver, ensuring users can take advantage of the most current database features and enhancements.
  • Resume Incomplete Tasks After System Restart: When the system restarts, Pulse resumes incomplete tasks that were in progress or queued for execution, providing seamless continuation without manual intervention.
  • Retry Failed Tasks: Pulse offers retry mechanisms using exponential and fixed backoff strategies with configurable attempts, ensuring efficient retries of failed tasks without overwhelming the system.
  • Continuous Maintenance: As an open-source project actively used in a production service, Pulse is consistently maintained and improved, providing users with reliable updates and support.
  • Extensive Documentation: Provides detailed guides and examples for a quick and easy start.

<br/> <br/>

Repository Structure

└── pulse/
    ├── LICENSE
    ├── README.md
    ├── es.js
    ├── examples
    │   └── concurrency.ts
    ├── package-lock.json
    ├── package.json
    ├── src
    │   ├── cjs.ts
    │   ├── index.ts
    │   ├── job
    │   ├── pulse
    │   └── utils
    ├── tsconfig.eslint.json
    └── tsconfig.json

<br/> <br/>

Modules

<details closed><summary>src.pulse</summary>

| File | Summary | | --- | --- | | has-mongo-protocol.ts | HasMongoProtocol establishes a function that evaluates if a given URL string contains a valid MongoDB connection protocol, contributing to the repositorys ability to handle and verify database connections. | | default-concurrency.ts | Sets the default concurrency for each job within the Pulse open-source project by modifying the internal state. It contributes to the task scheduling and management functionalities in the project. | | name.ts | Sets the name of a queue within the Pulse object in the parent repositorys architecture. It utilizes debugging for traceability and maintains the flow architecture by returning the Pulse instance after the name assignment. | | drain.ts | Drain.ts serves a crucial role in the Pulse module, enabling the cancellation of ongoing job processes. It ensures that all running jobs get completed before terminating the processing interval, promoting an efficient and orderly execution flow in the application. | | enable.ts | Enables specific jobs within the Pulse module by toggling the disabled flag to false. Utilizes MongoDB queries to precisely select matching jobs, aspiring to enhance the flexibility and robustness of job execution. Returns the count of jobs successfully enabled, aiding in operational tracking. | | schedule.ts | Schedule.ts within the Pulse directory facilitates job scheduling for specific timings. Through this module, users can assign an array of job names to be executed at a specified time, along with associated data. Multiple jobs can be created at once, enhancing the efficiency of task management in the repository. | | default-lock-lifetime.ts | Establishes the default lock lifetime in a Pulse application. It allows setting the default lock time in milliseconds, providing flexibility in managing task execution timelines. This is a critical feature for handling concurrency control in Pulses job processing system. | | db-init.ts | Establishes and initializes the database collection for job management in the Pulse open-source project. It also includes optional index creation functionality, providing efficient job searching within the database. Notifiers for success or errors make the process transparent and manageable. | | process-every.ts | ProcessEvery sets a default interval for a Pulse objects processing time. It leverages human-readable time intervals to determine the frequency of certain operations within the pulse directory of the repository. This function returns the updated Pulse object. | | disable.ts | Disables selected jobs in the Pulse application by applying a MongoDB filter query. The function returns the number of successfully disabled job instances, providing enhanced control over task execution. | | jobs.ts | Within the Pulse repository, the jobs.ts script from the src/pulse directory performs a crucial task. It retrieves all jobs matching a certain query from a MongoDB collection, with options for sorting, limiting and skipping results, transforming these into job objects before returning. | | start.ts | Start.ts initializes job processing for the Pulse module. It validates system readiness before periodically processing tasks using the processJobs method from the utils directory. The method ensures job execution regularity and guarantees uninterrupted operation, provided a database is set beforehand. | | every.ts | Within the pulse directory, every.ts establishes a regular job execution framework. It enables job scheduling at specified intervals, handling singular and multiple job names. Pertine

View on GitHub
GitHub Stars161
CategoryDevelopment
Updated2mo ago
Forks29

Languages

TypeScript

Security Score

100/100

Audited on Jan 27, 2026

No findings