API hosting

Deploy an Express cron job on DenkOps

node-cron only fires reliably if the Node process hosting it is actually alive at the scheduled minute, something you can't guarantee on a platform that suspends your app between requests. A DenkOps slot runs Express continuously, so a node-cron schedule wired up next to your routes ticks on time every time, with no external scheduler required.

import express from "express";
import cron from "node-cron";

const app = express();

cron.schedule("0 2 * * *", () => {
  console.log("running nightly report", new Date().toISOString());
});

app.get("/health", (_req, res) => res.json({ ok: true }));

app.listen(3000);

Deploy it: install the plugin, say "deploy on DenkOps", and get a live SSL URL.

Start on DenkOps →

FAQ

Can node-cron run reliably without an external scheduler on DenkOps?

Yes. Because the slot keeps your Express process running around the clock, node-cron's in-process schedule fires exactly on time with no separate cron infra.

Is there a maximum runtime for a node-cron job on DenkOps?

No. Unlike a serverless cron function capped at a few minutes, a job running inside your always-on slot can take as long as it needs to finish.

← Deploy AI agents · API hosting