Implement recurring tasks functionality

Adds automatic creation of next task instance when recurring tasks are completed.

- Add calculate_next_due_date() and create_next_recurrence() methods to Task model
- Update task completion handlers in views and sync API to create next recurrence
- Add hourly Celery task to process any missed recurring tasks
- Support daily, weekly, biweekly, monthly, yearly recurrence patterns
- Respect recurrence_end_date limits

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Keith Smith
2026-01-04 10:00:34 -07:00
co-authored by Claude Sonnet 4.5
parent c51fd846a2
commit 1d6b07bfed
5 changed files with 145 additions and 0 deletions
+4
View File
@@ -30,6 +30,10 @@ app.conf.beat_schedule = {
'task': 'notifications.tasks.check_overdue_tasks',
'schedule': crontab(hour=8, minute=0), # Daily at 8 AM
},
'process-recurring-tasks': {
'task': 'notifications.tasks.process_recurring_tasks',
'schedule': crontab(minute=0), # Every hour
},
}