Skip to content

RecurrentScheduledTrigger does not consider the time parameter #517

@bardram

Description

@bardram

When creating a RecurrentScheduledTrigger like this for daily recurrence occurring at 18:40:

protocol
  ..addTaskControl(
      RecurrentScheduledTrigger(type: RecurrentType.daily, time: const TimeOfDay(hour: 18, minute: 40)),
      d1,
      phone)
...

The AppTaskController enqueues the AppTask on the current (now) time, which in this case is 18:39:34 (and not at 18:40):

[log] [CAMS DEBUG] AppTaskController - Enqueued SurveyUserTask - id: 9d9865e1-02d9-4ac2-a355-bcd5ac85afaa, type: survey, name: Task #31, title: Sleep Survey, state: enqueued, triggerTime: 2025-10-08 18:39:34.215294. doneTime: null
[log] [CAMS DEBUG] AppTaskController - Enqueued SurveyUserTask - id: c956bbc2-bb36-4149-9f36-a8b2ff48ad59, type: survey, name: Task #31, title: Sleep Survey, state: enqueued, triggerTime: 2025-10-09 18:39:34.215294. doneTime: null
[log] [CAMS DEBUG] AppTaskController - Enqueued SurveyUserTask - id: d0ceb155-62d6-4fe2-b376-31cf48efb71c, type: survey, name: Task #31, title: Sleep Survey, state: enqueued, triggerTime: 2025-10-10 18:39:34.215294. doneTime: null

It seems like the time parameter is ignored.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions