This commit is contained in:
2026-04-07 12:44:06 +05:30
parent 7f81fc64c1
commit 5dd4196014
49 changed files with 2795 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
#!/usr/bin/env python3
from datetime import datetime
from zoneinfo import ZoneInfo
print("🔍 VERIFYING SCHEDULER SETUP")
print("=" * 50)
# Check current time
ist = ZoneInfo('Asia/Kolkata')
now = datetime.now(ist)
print(f"Current IST time: {now.strftime('%Y-%m-%d %H:%M:%S %Z')}")
# Check 8 PM today
eight_pm = now.replace(hour=20, minute=0, second=0, microsecond=0)
print(f"8:00 PM today: {eight_pm.strftime('%Y-%m-%d %H:%M:%S %Z')}")
# Test scheduler
try:
from app_core.services.scheduler_service import SchedulerService
s = SchedulerService()
s.start_scheduler()
print(f"✅ Scheduler started: {s.is_running()}")
next_run = s.get_next_run_time()
if next_run:
next_run_ist = next_run.astimezone(ist)
print(f"✅ Next run: {next_run_ist.strftime('%Y-%m-%d %H:%M:%S %Z')}")
else:
print("❌ No next run time found")
s.stop_scheduler()
print("✅ Scheduler stopped")
except Exception as e:
print(f"❌ Scheduler error: {e}")
# Test daily report
try:
from app_core.services.daily_report import main
print("\n🧪 Testing daily report...")
result = main()
print(f"✅ Daily report result: {result}")
except Exception as e:
print(f"❌ Daily report error: {e}")
print("\n" + "=" * 50)
print("✅ VERIFICATION COMPLETE")
print("=" * 50)