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

async-interval-job

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-interval-job

setInterval for promises and async functions. Support graceful shutdown and prevent multiple executions from overlapping in time.

  • 1.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
15
increased by1400%
Maintainers
1
Weekly downloads
 
Created
Source

⭕ async-interval-job ⭕

Documentation Documentation Documentation Maintenance License: MIT

setInterval for promises and async/sync functions.

  • Support graceful shutdown.
  • Prevent multiple executions from overlapping in time.

📥 Install

npm i async-interval-job

🏆 Overview

image

📖 Usage

import { AsyncIntervalJob } from 'async-interval-job';

const job = new AsyncIntervalJob(async () => {
    // Execute for each interval.
}, 60 * 1000);

job.start();

async function gracefulShutdown() {
    await job.stop();
    // Can close the db connections here ...
}

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

🌟 Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2022 a179346.
This project is MIT licensed.


This README was generated with ❤️ by readme-md-generator

Keywords

FAQs

Package last updated on 01 Oct 2022

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