Running Background Schedulers


I am hosting a dataframe on my gradio application based on a .csv file stored in my github repo. I want to sync the csv file with my gradio application every 1 hour. I tried using APscheduler (BackgroundScheduler), using it I am able to get the updated csv files in my local machine, but when I open the application the dataframe is not being updated, I tried defining the dataframe as a global parameter, but that did not work. Any suggestions of what might work?