#!/usr/bin/env python3 """Fix schedule 8 to use correct day-of-week for Wednesday""" import sys sys.path.insert(0, r'C:\PYTHON\Scheduler') from core.database import SchedulerDatabase import json db = SchedulerDatabase() # Get schedule 8 schedule = db.get_schedule(8) print(f"Current schedule 8: {schedule['name']}") print(f"Current config: {schedule['schedule_config']}") # Update to Wednesday (2 in ISO numbering) new_config = {'cron': '30 12 * * 2'} # Update the schedule conn = db.get_connection() cursor = conn.cursor() cursor.execute( "UPDATE schedules SET schedule_config = ? WHERE id = ?", (json.dumps(new_config), 8) ) conn.commit() conn.close() print(f"Updated config to: {new_config}") print("Schedule 8 'Check prodotti acquistati' now set to Wednesday at 12:30")