05/31 Phase 7

This commit is contained in:
2026-05-31 17:04:18 -04:00
parent 46a604a73a
commit 84f48a7b4d
14 changed files with 1202 additions and 1 deletions
+25
View File
@@ -0,0 +1,25 @@
#!/usr/bin/env python3
"""
Cron script: process due recurring transaction rules.
Run by systemd timer pfm-recurring.timer at 6AM daily.
"""
import sys
import os
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from app import create_app
from app.services.recurring_service import process_due_rules
app = create_app()
if __name__ == '__main__':
with app.app_context():
print('[recurring] Processing due rules...')
created = process_due_rules()
if created:
for desc in created:
print(f' Created: {desc}')
print(f'[recurring] {len(created)} transaction(s) created.')
else:
print('[recurring] No transactions due.')