{"id":17821510,"url":"https://github.com/a179346/async-interval-job","last_synced_at":"2025-03-18T10:30:22.976Z","repository":{"id":60557010,"uuid":"543694390","full_name":"a179346/async-interval-job","owner":"a179346","description":"✨ setInterval for promises and async/sync functions. Support graceful shutdown and prevent multiple executions from overlapping in time.","archived":false,"fork":false,"pushed_at":"2022-10-01T15:20:55.000Z","size":125,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-10T14:42:26.076Z","etag":null,"topics":["async","async-interval","async-interval-job","asynchronous","await","graceful","graceful-shutdown","interval","javascript","js","node","promise","promises","race","race-condition","repeat","setinterval","timer","ts","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/a179346.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-30T16:37:55.000Z","updated_at":"2022-10-04T14:42:34.000Z","dependencies_parsed_at":"2023-01-19T01:15:55.236Z","dependency_job_id":null,"html_url":"https://github.com/a179346/async-interval-job","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a179346%2Fasync-interval-job","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a179346%2Fasync-interval-job/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a179346%2Fasync-interval-job/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a179346%2Fasync-interval-job/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a179346","download_url":"https://codeload.github.com/a179346/async-interval-job/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243918589,"owners_count":20368745,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async","async-interval","async-interval-job","asynchronous","await","graceful","graceful-shutdown","interval","javascript","js","node","promise","promises","race","race-condition","repeat","setinterval","timer","ts","typescript"],"created_at":"2024-10-27T17:17:56.183Z","updated_at":"2025-03-18T10:30:22.512Z","avatar_url":"https://github.com/a179346.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003ch1 align=\"center\"\u003e ⭕ async-interval-job ⭕\u003c/h1\u003e\n\n\u003cp\u003e\n  \u003ca href=\"https://github.com/a179346/async-interval-job/actions/workflows/test.yml\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Documentation\" src=\"https://github.com/a179346/async-interval-job/actions/workflows/test.yml/badge.svg\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/async-interval-job\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Documentation\" src=\"https://img.shields.io/npm/v/async-interval-job?maxAge=3600)\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/a179346/async-interval-job#readme\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Documentation\" src=\"https://img.shields.io/badge/documentation-yes-brightgreen.svg\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/a179346/async-interval-job/graphs/commit-activity\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Maintenance\" src=\"https://img.shields.io/badge/Maintained%3F-yes-green.svg\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/a179346/async-interval-job/blob/master/LICENSE\" target=\"_blank\"\u003e\n    \u003cimg alt=\"License: MIT\" src=\"https://img.shields.io/github/license/a179346/async-interval-job\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003c/div\u003e\n\n\u003e setInterval for promises and async/sync functions.\n\u003e\n\u003e + __Support graceful shutdown.__\n\u003e + __Prevent multiple executions from overlapping in time.__\n\n ## 🔗 Link\n+ [Github](https://github.com/a179346/async-interval-job#readme)\n+ [npm](https://www.npmjs.com/package/async-interval-job)\n\n## 📥 Install\n\n```sh\nnpm i async-interval-job\n```\n\n## 🏆 Overview\n\n![image](https://github.com/a179346/async-interval-job/blob/main/flow/async-interval-job.png)\n\n## 📖 Usage\n```js\nimport { AsyncIntervalJob } from 'async-interval-job';\n\nconst job = new AsyncIntervalJob(async () =\u003e {\n    // Execute for each interval.\n}, 60 * 1000);\n\njob.start();\n\nasync function gracefulShutdown() {\n    await job.stop();\n    // Can close the db connections here ...\n}\n```\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome!\u003cbr /\u003eFeel free to check [issues page](https://github.com/a179346/async-interval-job/issues).\n\n## 🌟 Show your support\n\nGive a ⭐️ if this project helped you!\n\n## 📝 License\n\nCopyright © 2022 [a179346](https://github.com/a179346).\u003cbr /\u003e\nThis project is [MIT](https://github.com/a179346/async-interval-job/blob/master/LICENSE) licensed.\n\n***\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa179346%2Fasync-interval-job","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa179346%2Fasync-interval-job","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa179346%2Fasync-interval-job/lists"}