Skip to content

Cron and emails

If you self-host Jotly, two pieces keep it up to date: a job that runs every five minutes and an email provider for notifications.

The scheduled job

GET /api/cron does two things:

  • publishes scheduled changelog entries whose time has passed
  • resolves conversations that Nova handled and the customer stopped replying to

The route requires CRON_SECRET and the Authorization: Bearer header with that value; without the variable it responds 503. On Vercel, declaring the cron is enough: the platform sends the header for you.

vercel.json
{  "crons": [{ "path": "/api/cron", "schedule": "*/5 * * * *" }]}

On any other server, call the route from your cron every five minutes:

curl -H "Authorization: Bearer $CRON_SECRET" https://jotly.si/api/cron

Notification emails

All email notifications (status changes, replies to your customers) go through an outbox in the database. With RESEND_API_KEY they're sent right away; without it they're logged and nothing goes out.

.env
# Scheduled jobCRON_SECRET=a-long-random-string # Notification emails (optional)RESEND_API_KEY=re_…EMAIL_FROM="Jotly <notifications@yourdomain.com>"
Keep these variables in your secrets manager and your hosting configuration. Don't commit them to the repository.

See also Changelog