Schedulers
Activity Reminder Scheduler
- Config group:
platformConfigs.scheduler.activityReminders - Value format: Simplified cron expression -
"minute hour"in UTC (e.g."0 *") - Default:
"0 *"(every hour at minute 0)
A Cloud Tasks scheduled job fires a time event at a regular interval. When the coaching event handler receives this event, it reads the Activity Reminder Scheduler configuration.
The value is parsed as a two-part cron expression (minute hour). A wildcard
* means "match every" - so "0 *" means "at minute 0 of every hour". The
handler compares the parsed time against the current UTC time. If the current
hour and minute match, it runs the activity reminders job.
The reminders job queries all scheduled activities falling within the global timezone range (UTC-12 to UTC+14). For each activity, it checks whether the participant's preferred timezone and preferred reminder hours match the current time. If so, a reminder event is published containing the participant's name, contact details, and activity details, which downstream handlers use to send push/SMS/email reminders.
Missing Activity Scheduler
- Config group:
platformConfigs.scheduler.missingActivities - Value format: Simplified cron expression -
"minute hour"in UTC (e.g."5 20"= 20:05 UTC) - Default: None - if not set, the check is skipped entirely
Loaded alongside the Activity Reminder Scheduler in the same time event handler. If the config exists and the current UTC time matches the cron expression, it runs the missing activities job.
The job uses the Number of Consecutive Missed Days config (see below) and a hardcoded 7-day window to query for participants who have missed activities on consecutive days. It publishes a missing activity pattern event containing each participant's ID, total missing activities, and the list of missed activity names. This is typically used to create coach tasks for follow-up.
Number of Consecutive Missed Days
- Config group:
platformConfigs.tasks.consecutiveMissedDays - Value format: Integer string (e.g.
"2") - Default:
2
Used by the Missing Activity Scheduler during each run. The value controls the threshold - how many consecutive days of unreported activities a participant must have within a 7-day window before the system flags it.
If the value is not set, not a valid integer, or less than 1, it falls back to
2.