Skip to content

Local Runtime Quickstart

This is the file-based cronlet flow for Node.js apps.

Install

Terminal window
npm install cronlet cronlet-cli

Initialize the project

Terminal window
npx cronlet init

cronlet init will:

  • detect your app structure
  • create a jobs directory
  • add an example job
  • write a cronlet.config.* file

Create a job

import { schedule, weekly } from "cronlet";
export default schedule(weekly("fri", "09:00"), async () => {
await sendWeeklyDigest();
});

Start local development

Terminal window
npx cronlet dev

This starts:

  • job discovery
  • local scheduling
  • the local dashboard
  • file watching / hot reload

Default dashboard URL:

http://localhost:3141

Validate and inspect jobs

Terminal window
npx cronlet list
npx cronlet run weekly-digest
npx cronlet validate

Example with runtime safety

import { schedule, every } from "cronlet";
export default schedule(
every("1m"),
{
concurrency: "skip",
catchup: true,
retry: {
attempts: 3,
backoff: "exponential",
initialDelay: "30s",
},
timeout: "5m",
},
async () => {
await doWork();
}
);

Next step

Move to Local Runtime Reference for config files, commands, watch behavior, and deployment notes.