Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@vite-hub/schedule

Latest version: v0.6.1

Overview

Last scanned
27 Nov 2026
Published
27 Nov 2026
npm package Publisher: onmax_
36 Stars
4 Forks
7 Versions
7.5K Downloads
TypeScript Repo language

Scan summary

@vite-hub/schedule was last scanned on 27 Nov 2026 at version 0.6.1. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 7 versions; the latest 4 were published within 4 days (24–27 Nov 2026).
  • Findings: No rules fired in version 0.6.1.
  • Downloads: 7,529 downloads.

Versions

7 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.6.1 LATEST 27 Nov 2026 No rules fired
0.6.0 26 Nov 2026 No rules fired
0.5.1 25 Nov 2026 No rules fired
0.5.0 24 Nov 2026 Not shown
0.4.1 20 Nov 2026 Not shown

No rules fired in 0.6.1

Findings

Findings for v0.6.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.6.1; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@vite-hub/schedule

npm version npm downloads license docs

@vite-hub/schedule discovers recurring work, generates cron output for supported hosts, and can run Static Schedule Definitions in one long-lived process.

Choose the package

Install vite-hub and @vite-hub/schedule for an application. vite-hub exposes application imports under vite-hub/schedule and loads Schedule from the app.

pnpm add vite-hub @vite-hub/schedule

A file in server/schedules/ turns Schedule on in the framework integration. Import application helpers from its feature path:

// vite.config.ts
import { vitehub } from "vite-hub";
import { defineConfig } from "vite";

export default defineConfig({
  plugins: [vitehub({ host: "cloudflare" })],
});
import { defineSchedule } from "vite-hub/schedule";

Install the owner package directly when a library or custom integration needs Schedule without the framework distribution.

pnpm add @vite-hub/schedule

Direct integrations use @vite-hub/schedule, @vite-hub/schedule/runtime, and @vite-hub/schedule/vite. Add Vite when the project uses hubSchedule(). Add @vite-hub/kv when using the KV Schedule Run store through @vite-hub/schedule/runtime/kv or the generated Process Runtime. Static Schedule Definitions, memory stores, and custom ScheduleKVStorage implementations do not require KV.

Both packages require Node.js 24.15 or newer.

Run one occurrence

This smoke test uses the direct owner-package import. If the application installed vite-hub, use vite-hub/schedule and vite-hub/schedule/runtime. It defines a Static Schedule and executes one fixed occurrence without a Vite config or hosted scheduler.

import { defineSchedule } from "@vite-hub/schedule";
import { executeStaticSchedule } from "@vite-hub/schedule/runtime";

const dailyReport = defineSchedule({
  cron: "0 8 * * *",
  handler({ scheduledAt }) {
    console.log(`Report scheduled for ${scheduledAt.toISOString()}`);
  },
});

const run = await executeStaticSchedule({
  cron: dailyReport.cron,
  definition: dailyReport,
  name: "daily-report",
  scheduledAt: new Date("2026-08-27T08:00:00.000Z"),
});

console.log(run.status);
Report scheduled for 2026-08-27T08:00:00.000Z
succeeded

The example uses the default in-memory Schedule Run store. It proves the handler and run bookkeeping, but it does not install a recurring wake or generate Provider Output.

Discover a static schedule

Register the direct owner-package integration in Vite.

// vite.config.ts
import { hubSchedule } from "@vite-hub/schedule/vite";
import { defineConfig } from "vite";

export default defineConfig({
  plugins: [hubSchedule()],
});

Then export a definition from server/schedules/<name>.ts or src/<name>.schedule.ts.

// server/schedules/daily-report.ts
import { defineSchedule } from "@vite-hub/schedule";

export default defineSchedule({
  cron: "0 8 * * *",
  async handler({ scheduledAt, waitUntil }) {
    await sendDailyReport(scheduledAt);
    waitUntil(recordDelivery());
  },
});

Static Schedule Definitions use five-field cron expressions. The cron uses UTC unless the definition sets timeZone to an IANA name, such as Europe/Madrid. timeZone works with the Process Runtime and with every host's cron output.

The integration can generate host-specific output for Cloudflare Cron Triggers, Vercel Cron Jobs, Netlify Scheduled Functions, standalone Deno.cron, Nitro's Cloudflare schedule hook, and Netlify Scheduled Functions that run in Nitro's server bundle. A build writes only the output of its host: Nitro's resolved preset, or else nitro.preset, NITRO_PRESET, SERVER_PRESET, or VITEHUB_HOST. It writes the output of every host only when no host is known. Host selection, local execution, deployment proof, limits, and billing still come from the selected host. Check the runtime and host support matrix before deploying. Write weekdays as standard cron numbers, 0 to 6 from Sunday. Cloudflare and Deno number weekdays 1 to 7 from Sunday, so their output writes weekday names: 0 4 * * 1-5 becomes 0 4 * * MON,TUE,WED,THU,FRI.

Applications that use the framework distribution turn Schedule on with a file in server/schedules/, with no schedule key, and import the definition helper from vite-hub/schedule. On Deno, the build writes standalone cron output and a .output/main.ts entrypoint that loads it before the Nitro server.

Nuxt projects enable Schedule with vite-hub/nuxt and a file in server/schedules/. The module installs the Vite integration and merges Schedule output into Nitro config.

Start a Schedule from code

Leave out cron when your users pick the time, such as a reminder. Code then starts the Definition with startSchedule(), once at at or on a cron in a timeZone, and the handler gets payload.

// server/schedules/reminder.ts
import { defineSchedule } from "@vite-hub/schedule";

export default defineSchedule({
  handler({ payload }) {
    console.log("Reminder", payload);
  },
});
import { cancelSchedule, listSchedules, startSchedule } from "@vite-hub/schedule";

const [error, reminder] = await startSchedule("reminder", { at: "2026-11-08T09:00:00Z", payload: { text: "Call Ana" } });
const [, standUp] = await startSchedule("reminder", { cron: "0 9 * * 1-5", timeZone: "Europe/Madrid", payload: { text: "Stand-up" } });
const [, started] = await listSchedules({ name: "reminder" });
await cancelSchedule(standUp!.id);

The functions return [error, data]. The Schedules are stored in KV, so they survive restarts and deploys. When a Definition has no cron, the build adds the Schedule vitehub/started-schedules with the cron * * * * *: Cloudflare wakes it with a Cron Trigger, and the Process Runtime wakes it on Node. Each wake runs the started Schedules that are due. Started Schedules need KV, and on Node the Process Runtime. vitehub schedule start and cancel and the Console Schedules page show and change them. vitehub schedule list lists them after the Static Schedule Definitions, and works without KV when no Definition can be started. Read the server API for the delivery rules.

Understand time zones

The value of timeZone must be an IANA name. Abbreviations such as PST and numeric offsets such as +01:00 are rejected. The Process Runtime accepts any expression, such as a shared constant. Host cron output reads timeZone from the source file at build time, so write it as a string literal there. A dynamic value fails the build with SCHEDULE_R0003.

Cloudflare, Vercel, Netlify, and Deno read cron in UTC only. For a Schedule with a timeZone, the build writes a UTC cron that covers every offset of the time zone in the next two years, and the runtime checks the local time on each wake. 0 8 * * * in Europe/Madrid becomes 0 6,7 * * *: the host wakes the Schedule twice a day, and the Schedule runs at the wake that is 08:00 in Madrid. When a local time moves to another UTC day, the UTC cron wakes every day, or on the shifted weekdays, and the runtime checks the local date. A cron override in the build config replaces both the cron and the time zone: the host runs the override in UTC. Rebuild when a time zone changes its rules.

On daylight saving time changes, every host and the Process Runtime behave the same:

  • A local time that the clock skips runs once, shifted by the length of the gap, as RFC 5545 and Temporal read it. 30 2 * * * in Europe/Madrid runs at 03:30 on the spring-forward day.
  • A local time that occurs twice runs once, at its first occurrence, when the cron sets a fixed minute and hour. A cron with * in the minute or hour field runs on elapsed time, so it also runs in the repeated hour.

Run a Schedule once per occurrence

Each run gets idempotencyKey, schedule:<name>:<scheduledAt ISO>. Cloudflare supplies the scheduled timestamp, and the Process Runtime records each occurrence. Repeated deliveries of those occurrences keep the same key. Pass the key to Email, a Channel send(), or a Queue on Vercel or the local driver to dedupe work with the same key:

export default defineSchedule({
  cron: "0 7 * * *",
  timeZone: "Europe/Stockholm",
  async handler({ idempotencyKey }) {
    const [error] = await email.send({ from, to, subject: "Today's lesson", text, idempotencyKey });
    if (error) throw error;
  },
});

The Process Runtime also stores one run per occurrence, so it does not run a repeated wake again. Host cron output does not store runs.

Vercel, Netlify, and Deno do not supply a scheduled timestamp to these entries. They estimate scheduledAt as the latest host UTC cron match within the previous day, or the current minute when none matches. A late delivery or retry after another host cron match can get a different key. Time-zone filtering uses that estimate too: a summer Madrid 06:00 wake delivered after the extra 07:00 wake can be skipped. These hosts cannot guarantee occurrence identity or dedupe across that boundary. Use an application business key for side effects that must dedupe across delays and retries.

Run schedules in the server process

The generated Process Runtime runs each Static Schedule Definition on its cron inside the Node.js process. It records Schedule Runs in the default KV store configured by hubKV(). Use it on long-lived servers, one or more. vitehub({ host: "node", schedule: true }) turns it on for you. With hubSchedule() alone, set runtime:

import { hubKV } from "@vite-hub/kv/vite";
import { hubSchedule } from "@vite-hub/schedule/vite";
import { defineConfig } from "vite";

export default defineConfig({
  plugins: [
    hubKV(),
    hubSchedule({
      runtime: {
        driver: "process",
        prefix: "my-app:schedule",
      },
    }),
  ],
});

Its defaults are prefix vitehub:schedule, scan interval 60_000 milliseconds, concurrency 1, catch-up catchUpMs of one hour, and leaseTtlMs of one minute. The interval cannot exceed one minute. concurrency limits runs only inside that process. A queued occurrence can start while its scheduled minute is within catchUpMs of the current minute; older queued work is dropped. With catchUpMs: 0, it can start only in its scheduled minute. After a restart, the runtime runs the due minutes that no process checked, within catchUpMs, for each Schedule that already has a run. Run ids are deterministic, so a minute that already ran does not run again. Request-scoped and serverless hosts must not use the Process Runtime because the process may stop between requests.

Run on more than one server

Every server checks every Schedule. Before a server runs an occurrence, it takes a lease on the key <prefix>/schedule/<run id>, such as vitehub:schedule/schedule/srun_static_daily_2026-11-09T08:00:00.000Z. The prefix is runtime.prefix, which defaults to vitehub:schedule. Use a different prefix for each app that shares a Database, and the same prefix on every server of one app. One server gets the lease and runs the occurrence while it holds that lease. The others skip it and try again at their next scan. Started Schedules use the same lease for each occurrence. Manual runs have their own run id, so the server that gets the request runs them once.

  • The server that holds the lease renews it every third of leaseTtlMs while the run works. When the run ends, it writes a done marker (<prefix>/schedule/<run id>/done) and frees the lease. The marker lasts for catchUpMs plus leaseTtlMs plus two minutes, so a server that starts later does not run the occurrence again. If the marker write fails, the server reports the error and tries to extend its claim for the same time, without releasing it. If that also fails, another server can run the occurrence after the claim expires.
  • If the server loses the Database, or its event loop pauses, for longer than leaseTtlMs, its lease can expire while its handler still runs. Another server can run the same occurrence at the same time. The runtime reports renewal failures, but cannot stop the handler or undo its effects. Choose a TTL longer than expected pauses and make external effects idempotent.
  • If the lease store fails before a run starts, the server reports the error and retries at its next scan while the occurrence is inside catchUpMs.
  • A failed run is final, as on one server. It is not retried.
  • When a server stops during a run, for example after a crash, its lease ends after leaseTtlMs. Then another server runs the occurrence, unless it has a done marker. A server that found the lease held tries the occurrence again until catchUpMs plus leaseTtlMs plus one minute after its scheduled minute, also with catchUpMs: 0. With shared run history, the run gets a new attempt, and the stopped attempt is marked as failed. This also works when every server restarts: at start, a server reads the runs inside catchUpMs that are still pending or running, and tries them again.

The generated runtime keeps the leases in the vitehub_leases table of the Default Database, through useLeases() from @vite-hub/database. That works on Postgres, with postgres.js or node-postgres, remote libSQL, and D1. With VITEHUB_INSTANCES greater than 1, a Node server with a Postgres or remote libSQL Default Database reports Schedule as shared at boot. A local libSQL file is safe for one server process only, because @libsql/client can lose writes when several processes write to one file. The server prints a warning at the first lease in that case. Without a Database, the leases stay in memory and the build reports the hint SCHEDULE_PROCESS_CLAIMS_IN_MEMORY in its output and in .vitehub/hints.json: each server then runs every occurrence, so run one server only. The run history stays in KV. Use a KV store that all servers share, such as Upstash, so catch-up and the Console see the runs of every server.

With the Process Runtime, the default providerOutput: "auto" emits no host Provider Output, so the process owns Static Schedule wakes. Set providerOutput: "standalone" or "nitro" to move Static Schedule wakes to that Provider Output. providerOutput: false records the same wake ownership as "auto" in this configuration.

A custom long-running host can call installProcessScheduleRuntime({ registry, scheduleRunStore, leases, prefix }) from @vite-hub/schedule/runtime/process. Pass the same shared LeaseStore and prefix to every process of one app. prefix defaults to vitehub:schedule; use the same prefix for the app's Schedule stores. Without leases, it uses createMemoryLeaseStore(), which is for one process only. Call and await controller.close() during shutdown. It waits for active runs and their waitUntil() work, then stops the timer. It does not delete Schedule Definitions or run history. The generated Nitro Process Runtime registers the same close operation with ViteHub shutdown. See graceful shutdown.

Install an OS timer

A CLI or a desktop tool has no server that stays on. @vite-hub/schedule/os installs the cron of a Schedule as a systemd timer on Linux, a launchd job on macOS, or a Task Scheduler task on Windows. The operating system then starts your command at each time.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @vite-hub/schedule

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

PolinRider Returns
Research

PolinRider Returns: Hijacked npm Packages Use Ethereum Blockchain to Conceal Malware Infrastructure

Copy of Template Design OX Blog (1)
Research

Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret Stealing Malware Via GitHub Actions & npm

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

Frame 2085668439 (1)
Group 1261154229