Reminder intervals — how many days before

Pick how many days before the due date a reminder fires, and combine multiple intervals per template

OwnerManager

A reminder template's countdownDays is the gap, in days, between the due date and the send. A countdown of 30 means "send this message 30 days before the due date."

One countdown per template

Each template stores a single countdownDays value. If you want a 30-day reminder AND a 7-day "last chance" reminder, create two separate templates — both targeting MOT, one with countdownDays: 30, one with countdownDays: 7.

This is intentional: each template is one cohesive message at one timing point.

Common patterns

GoalTemplate setup
MOT renewalTwo templates: one at 30 days, one at 7
ServiceOne template at 14 days
Timing beltTwo templates: one at 60 days, one at 30
Appointment confirmationOne template at 1 day before

How scheduling works

Reminders aren't matched against vehicles by a daily date-scan. Instead, when a jobcard is completed (or when an appointment is created), Pistonlog pre-schedules the relevant reminder rows in reminder_logs with their scheduledDate set to (due_date - countdownDays). The daily cron then sends every row whose scheduledDate has passed and that hasn't already been sent.

That means setting up a new template won't retroactively schedule reminders for vehicles that completed jobcards in the past — it only affects future scheduling.

Past the due date

Reminders fire on or before the due date. There's no built-in support for "your MOT was due X days ago" follow-ups via a template — that would need a custom one-off reminder.

Related

Was this article helpful?