Schedule recurring reminders in each user’s timezone
Create per-user cron schedules with local times, IANA timezones, and editable reminder preferences.
A schedule belongs to a user
Your app owns the reminder and its permissions. Cuey owns the scheduled HTTP request. Store the Cuey cron ID alongside your reminder so you can update or remove the right schedule.
Create, change, pause, delete
Use the SDK from an authenticated server route. Verify that the current user owns the reminder before changing its schedule. Validate the cron expression and IANA timezone on your backend.
import { cuey } from "cuey";
// Keep your complete delivery configuration on the server.
const delivery = {
webhook_url: "https://your.app/api/remind",
method: "POST" as const,
timezone: "America/New_York",
headers: { Authorization: `Bearer ${process.env.REMINDER_SECRET}` },
payload: { reminder_id: "reminder_123" },
retry_config: {
maxRetries: 3,
backoffMs: 500,
backoffType: "exponential" as const,
},
};
const cron = await cuey.repeat({
...delivery,
cron_expression: "0 9 * * 1-5",
});
// Store cron.id alongside the reminder.
// PUT replaces the configuration: include delivery fields each time.
await cuey.crons.update(cron.id, {
...delivery,
cron_expression: "0 18 * * 1-5",
is_active: true,
});
// Pause it, preserving the same delivery configuration.
await cuey.crons.update(cron.id, {
...delivery,
cron_expression: "0 18 * * 1-5",
is_active: false,
});
await cuey.crons.delete(cron.id);Keep preferences in your database
The callback should load the latest reminder settings by ID. Check whether the user has disabled it before sending a notification. Updating a schedule does not undo a request already in progress.
Make retries safe
Use a durable deduplication key for each intended reminder occurrence. Claim that occurrence in your database before performing a side effect. Decide how your app handles missed runs and daylight-saving transitions.
Let users choose a time, not a cron expression
Convert simple controls such as weekdays and local time into a cron expression. Use the cron preview tool to inspect the result. Store the user's IANA timezone with the schedule.
Keep 09:00 in the user's timezone
Use 0 9 * * 1-5 with America/New_York for weekday reminders at 09:00 local time. Keep the expression in local time; pass the IANA timezone as a separate field. You can inspect upcoming runs in the cron preview.
Ask users whether reminders should follow their home timezone or their location. Update the stored timezone when they change that preference. Decide how to handle skipped or repeated local times during daylight-saving changes and test with your scheduler before sending reminders.
Copy a React picker for local time and repeat controls, or send the reminder through Resend.
Start with one reminder
Schedule a reminder for your own endpoint, confirm delivery, then add editing and cancellation. Check your required scale and timing behaviour before expanding to production traffic.
Schedule your first request
The first 10,000 events each month are free. Additional events cost $0.0001 each. See pricing or read the API documentation.
Get your API key ↗