#!/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)