#!/usr/bin/env python3 """Temporary script to check schedule configuration""" import sys sys.path.insert(0, r'C:\PYTHON\Scheduler') from core.database import SchedulerDatabase import json from datetime import datetime db = SchedulerDatabase() print("=== ALL SCHEDULES ===\n") schedules = db.get_all_schedules(enabled_only=False) for s in schedules: print(f"ID: {s['id']}, Name: {s['name']}") print(f" Type: {s['schedule_type']}") print(f" Target: {s['target_type']} -> {s.get('target_name', 'N/A')}") config = s['schedule_config'] if isinstance(config, str): config = json.loads(config) print(f" Config: {config}") print(f" Enabled: {s['enabled']}") print() print("\n=== EXECUTION HISTORY (Last 10) ===\n") history = db.get_execution_history(limit=10) for h in history: print(f"{h['start_time']} - {h['job_name']} - Status: {h['status']}") if h.get('schedule_name'): print(f" Triggered by schedule: {h['schedule_name']}") print()