from apscheduler.schedulers.background import BackgroundScheduler
import pytz
from datetime import time, datetime

IST = pytz.timezone("Asia/Kolkata")

scheduler = BackgroundScheduler(timezone=IST)

def schedule_daily(job_func, hour=9, minute=0):
    """Schedule a job daily at given IST time"""
    scheduler.add_job(job_func, "cron", hour=hour, minute=minute)
    scheduler.start()
