The timing layer for Next.js.

Remind users who haven’t activated. Expire trials. Reindex once after edits settle.

npm install delaykit
// handler checks state, retries on failure
dk.handle("remind", {
  handler: async ({ key }) => {
    const user = await db.users.find(key);
    if (user.onboarded) return;
    await sendEmail(user.email, "heads up");
  },
  retry: {
    attempts: 5,
    backoff: "exponential",
  },
});

// schedule it for 24 hours from now
await dk.schedule("remind", {
  key: "user_123",
  delay: "24h",
});
Patterns

What you can do with it

Properties

The shape of it

Deploy

Works on Vercel