Fix cron: notify tasks with due_time but no due_date (treat as today)
Deploy HouseHub / deploy (push) Successful in 1s
Deploy HouseHub / deploy (push) Successful in 1s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
c758337ff3
commit
5d5ccf406d
@@ -60,14 +60,15 @@ foreach ($families as $family_id) {
|
|||||||
$webhook = $ws->fetchColumn();
|
$webhook = $ws->fetchColumn();
|
||||||
if (!$webhook) continue;
|
if (!$webhook) continue;
|
||||||
|
|
||||||
// Tasks due now: due today, due_time reached, not done, not yet notified
|
// Tasks due now: due_time reached, not done, not yet notified
|
||||||
|
// Handles: date+time, time only (null date = today), overdue with time
|
||||||
$stmt = $pdo->prepare("
|
$stmt = $pdo->prepare("
|
||||||
SELECT t.id, t.title, t.due_date, t.due_time,
|
SELECT t.id, t.title, t.due_date, t.due_time,
|
||||||
l.name AS list_name, l.icon AS list_icon
|
l.name AS list_name, l.icon AS list_icon
|
||||||
FROM pf_todos t
|
FROM pf_todos t
|
||||||
LEFT JOIN pf_todo_lists l ON l.id = t.list_id
|
LEFT JOIN pf_todo_lists l ON l.id = t.list_id
|
||||||
WHERE t.due_date = CURDATE()
|
WHERE t.due_time IS NOT NULL
|
||||||
AND t.due_time IS NOT NULL
|
AND (t.due_date IS NULL OR t.due_date <= CURDATE())
|
||||||
AND t.due_time <= CURTIME()
|
AND t.due_time <= CURTIME()
|
||||||
AND t.done = 0
|
AND t.done = 0
|
||||||
AND t.notified = 0
|
AND t.notified = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user