Gathering detailed insights and metrics for @fastify/schedule
Gathering detailed insights and metrics for @fastify/schedule
Gathering detailed insights and metrics for @fastify/schedule
Gathering detailed insights and metrics for @fastify/schedule
npm install @fastify/schedule
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
94 Stars
133 Commits
12 Forks
19 Watching
2 Branches
24 Contributors
Updated on 18 Nov 2024
JavaScript (56.1%)
TypeScript (43.9%)
Cumulative downloads
Total Downloads
Last day
-7.8%
1,414
Compared to previous day
Last week
14.3%
7,605
Compared to previous week
Last month
-2.4%
32,278
Compared to previous month
Last year
98.6%
300,387
Compared to previous year
1
1
Fastify plugin for scheduling periodic jobs. Provides an instance of toad-scheduler on fastify instance. Jobs are stopped automatically when the fastify instance is stopped.
First install the package:
1npm i @fastify/schedule toad-scheduler
Next, set up the plugin:
1const fastify = require('fastify')(); 2const { fastifySchedulePlugin } = require('@fastify/schedule'); 3const { SimpleIntervalJob, AsyncTask } = require('toad-scheduler'); 4 5const task = new AsyncTask( 6 'simple task', 7 () => { return db.pollForSomeData().then((result) => { /* continue the promise chain */ }) }, 8 (err) => { /* handle errors here */ } 9) 10const job = new SimpleIntervalJob({ seconds: 20, }, task) 11 12fastify.register(fastifySchedulePlugin); 13 14// `fastify.scheduler` becomes available after initialization. 15// Therefore, you need to call `ready` method. 16fastify.ready().then(() => { 17 fastify.scheduler.addSimpleIntervalJob(job) 18})
For more detailed instructions, see the documentation of toad-scheduler
.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
10 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 9
Reason
SAST tool is not run on all commits -- score normalized to 6
Details
Reason
Found 8/20 approved changesets -- score normalized to 4
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More