npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

silent-cronx

v1.2.0

Published

A fully customized, dependency-free runtime, TypeScript-first background job, queue, worker, cron, progress, and React/React Native compatible SDK for Node.js.

Readme

SilentCronX

npm version Node.js TypeScript License: MIT Runtime deps

SilentCronX is a fully customized, TypeScript-first background job, queue, worker, cron, progress, and React/React Native compatible SDK for Node.js. It is built as original SDK code by Pradeep Kumar Sheoran (Developer) at BSG Technologies with no runtime third-party library dependency.

Official website: https://bsgtechnologies.com
Visit here to meet, learn, contribute, and discuss new topics with us.

Contact / WhatsApp: +91-8595147850
Donation / Support UPI mobile number: +91-8595147850
Looking For a Job Change: You can use my Reactjs, React Native, Android (Java), Nodejs packages, and newly launched scripts including TypeScript. Any feature or update you want, leave a comment.

Why SilentCronX

  • Cron, delay, interval, immediate, queue, and worker-thread jobs from one SDK.
  • Fully customizable job options: retry, timeout, priority, payload, logger, storage, concurrency, locks, and overlap prevention.
  • Reliable execution model with graceful shutdown, AbortSignal cancellation, lifecycle events, event history, health snapshots, and job status tracking.
  • Advanced queue operations: pause, resume, clear, inspect stats, set concurrency, use rate limits, and prioritize work.
  • Native job progress updates for ReactJS and React Native progress bars.
  • Built-in native fetch API client through createSilentCronXClient.
  • Safe by design: no eval, no shell execution by default, no hidden process behavior, and serializable payload validation.
  • React, React Native, Android, and web-app friendly through normal API routes: run jobs on Node.js, call them from any client.
  • Modern Node.js and TypeScript output: ESM, CJS, and declaration files.
  • Runtime dependency-free package code; dev tools are only used to build and typecheck the SDK.

Installation

npm install silent-cronx

Quickstart

import { createSilentCronX } from "silent-cronx";

const cron = createSilentCronX({
  timezone: "Asia/Kolkata",
  maxWorkers: 4,
  maxConcurrency: 25,
  defaultTimeout: 30_000,
  preventOverlapping: true,
  logger: console,
});

cron.on("job:success", (event) => {
  console.log("Job completed", event.name, event.durationMs);
});

await cron.schedule("daily-report", {
  cron: "0 9 * * *",
  payload: { reportType: "sales" },
  retry: { attempts: 3, backoff: "exponential", delayMs: 1000, maxDelayMs: 10_000, jitter: true },
  timeout: 20_000,
  preventOverlap: true,
  task: async ({ payload, signal, progress }) => {
    if (signal.aborted) return;
    await progress({ percent: 25, message: "Report started" });
    console.log("Generating report:", payload.reportType);
    await progress({ percent: 100, message: "Report completed" });
  },
});

cron.start();

process.once("SIGINT", async () => {
  await cron.shutdown();
  process.exit(0);
});

Feature Examples

Run a Job Immediately

const result = await cron.runNow("send-welcome", {
  payload: { userId: 101 },
  task: async ({ payload }) => {
    return { sent: true, userId: payload.userId };
  },
});

console.log(result.status, result.result);

Delay a Job

await cron.delay("follow-up-message", {
  delayMs: 5_000,
  payload: { phone: "+91-8595147850" },
  task: async ({ payload }) => {
    console.log("Send follow-up to", payload.phone);
  },
});

Repeat a Job

await cron.every("cache-refresh", {
  intervalMs: 60_000,
  preventOverlap: true,
  task: async () => {
    console.log("Refresh cache");
  },
});

Queue Work with Priority

cron.queue("invoice-queue", {
  concurrency: 5,
  maxSize: 1000,
  rateLimit: { limit: 100, intervalMs: 60_000 },
  retry: { attempts: 3, backoff: "linear", delayMs: 1000, jitter: 0.15 },
  processor: async ({ payload }) => {
    console.log("Generate invoice", payload);
  },
});

await cron.addJob("invoice-queue", {
  name: "invoice-5001",
  priority: 10,
  payload: { invoiceId: 5001 },
});

console.log(cron.getQueueStats("invoice-queue"));
cron.pauseQueue("invoice-queue");
cron.resumeQueue("invoice-queue");

Worker Thread Module

const workerResult = await cron.runWorker("heavy-csv-job", {
  payload: { filePath: "./large.csv" },
  timeout: 60_000,
  worker: {
    path: new URL("./workers/csvWorker.js", import.meta.url),
    exportName: "processCsv",
  },
});
// workers/csvWorker.ts
export async function processCsv({ payload }: { payload: { filePath: string } }) {
  return { processed: true, filePath: payload.filePath };
}

Connect with React or Any Frontend

SilentCronX runs in Node.js. A React, React Native, Android, or web client should call your backend API, and the backend should trigger or inspect jobs.

Native SilentCronX Client

import { createSilentCronXClient } from "silent-cronx";

const client = createSilentCronXClient({
  baseUrl: "http://localhost:4517",
  headers: {
    Authorization: "Bearer YOUR_API_TOKEN",
  },
});

const { jobId } = await client.triggerJob("report", {
  payload: { reportType: "daily" },
  priority: 10,
});

const job = await client.getJob(jobId);
const queueStats = await client.getQueueStats();
const health = await client.getHealth();
// React / latest React app client example
await fetch("/api/jobs/send-report", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ reportType: "daily" }),
});

See examples/live-demo for a zero-dependency Node demo that exposes HTTP routes and shows how a frontend connects.

ReactJS Hook Example

import { useState } from "react";

type JobResponse = {
  accepted: boolean;
  jobId: string;
};

export function useSilentCronXJob(baseUrl = "") {
  const [loading, setLoading] = useState(false);
  const [jobId, setJobId] = useState<string | null>(null);

  async function triggerReport(reportType: string): Promise<JobResponse> {
    setLoading(true);
    try {
      const response = await fetch(`${baseUrl}/jobs/report`, {
        method: "POST",
        headers: { "Content-Type": "application/json" },
        body: JSON.stringify({ reportType }),
      });
      const data = (await response.json()) as JobResponse;
      setJobId(data.jobId);
      return data;
    } finally {
      setLoading(false);
    }
  }

  return { loading, jobId, triggerReport };
}

React Native Example

import { useState } from "react";
import { Button, Text, View } from "react-native";

const API_BASE_URL = "http://localhost:4517";

export function SilentCronXJobScreen() {
  const [jobId, setJobId] = useState<string | null>(null);

  async function triggerReport() {
    const response = await fetch(`${API_BASE_URL}/jobs/report`, {
      method: "POST",
      headers: { "Content-Type": "application/json" },
      body: JSON.stringify({ reportType: "mobile-daily" }),
    });
    const data = await response.json();
    setJobId(data.jobId);
  }

  return (
    <View>
      <Button title="Start SilentCronX Job" onPress={triggerReport} />
      {jobId ? <Text>Job queued: {jobId}</Text> : null}
    </View>
  );
}

More details are in docs/REACT_COMPATIBILITY.md.

Response Shape

{
  "jobId": "now_1720000000000_abcd1234",
  "name": "send-welcome",
  "status": "success",
  "result": {
    "sent": true
  },
  "attempt": 1,
  "durationMs": 12,
  "startedAt": "2026-07-15T10:00:00.000Z",
  "finishedAt": "2026-07-15T10:00:00.012Z"
}

More response and event details are in docs/RESPONSE_GUIDE.md.

Documentation

API Surface

  • createSilentCronX(config)
  • new SilentCronX(config)
  • createSilentCronXClient(config)
  • cron.schedule(name, options)
  • cron.delay(name, options)
  • cron.every(name, options)
  • cron.runNow(name, options)
  • cron.runWorker(name, options)
  • cron.queue(name, options)
  • cron.addJob(queueName, job)
  • cron.pauseQueue(queueName)
  • cron.resumeQueue(queueName)
  • cron.clearQueue(queueName)
  • cron.getQueueStats(queueName?)
  • cron.cancel(jobId)
  • cron.pause(jobId)
  • cron.resume(jobId)
  • cron.getStatus(jobId)
  • cron.getJobs()
  • cron.getHealth()
  • cron.start()
  • cron.stop()
  • cron.shutdown()
  • cron.on(eventName, handler)
  • cron.off(eventName, handler)
  • cron.getEventHistory(eventName?)
  • cron.clearEventHistory()

Production Checklist

  • Keep job handlers idempotent.
  • Validate user payloads before enqueueing jobs.
  • Set timeout and retry limits for every external operation.
  • Use preventOverlap for billing, reports, sync, and other critical jobs.
  • Use persistent custom storage for multi-instance production systems.
  • Subscribe to job:failed, job:timeout, and error events.
  • Call shutdown() on SIGINT and SIGTERM.
  • Use worker module references for CPU-heavy work.

Development

npm install
npm run typecheck
npm run build
npm run pack:dry

Hashtags

#SilentCronX #NodeJS #TypeScript #CronJobs #BackgroundJobs #WorkerThreads #QueueSystem #Scheduler #ReactJS #ReactNative #AndroidJava #BSGTechnologies #PradeepKumarSheoran