Calendar - Extending¶
Reminder Configuration¶
There is currently no UI for reminder settings. Both can be set from a script.
Global Offset¶
The number of days before a deadline that a reminder event appears. Default is 3 days. Use scMaintenance.setReminderOffset and pass the value in milliseconds:
Per-Template Toggle¶
Controls whether reminders are generated for tasks created from a specific template. Default is off. There is no helper function for this — update the maintenanceLog_templates table directly and call updateTemplates() to refresh the in-memory cache so the calendar picks up the change immediately:
var templateType = "Filterbyte";
var current = scMaintenance.getAllTemplatesMap()[templateType];
var newVal = (current && current.reminder_enabled === 1) ? 0 : 1;
DatabaseConnections["maintenance"].exec(
"UPDATE maintenanceLog_templates SET reminder_enabled = " + newVal + " WHERE type = '" + templateType + "'"
);
scMaintenance.updateTemplates();
Tasks created without a template always generate reminders regardless of this setting.