If you are deploying on Streamlit Cloud you are more limited than if you have control over the infrastructure serving your app.
If you have control over the infrastructure, you could use whatever scheduling was available within that system.
As for Streamlit Cloud, the only recommendation I have is to schedule some computer somewhere to connect to your app at 1 AM, so that it can do any of your more expensive computations that you want to cache. (For example, if you have a get_data(date)
function that is cached, then by passing in the date, it will use the cache until the date changes…modulo some cleanup depending on how much data is being cached and how long your app runs between reboots.)
I made an example of a script that connects to a Streamlit app. This could be packaged up in a bat file and scheduled for instance.