Hi, I tried to schedule my streamlit app thru windows task scheduler in Server. But it always opens a new window in server immediately after execution. Since that is prod system, I don’t want to create that window. Users will use that link from client machines. Could you please suggest how to supress opening of new browser window for local host?
You need to have your app run in “headless” mode. There are 4 different ways to set this configuration per this page, scroll down to the “View all config options” section. So in your case, you can create a config.toml file and add:
[server] headless = true
or set the environment variable STREAMLIT_SERVER_HEADLESS=true
or when you run your app at the command line, you can just pass the --server.headless true parameter like so:
streamlit run your_app.py --server.headless true
To the streamlit devs:
I think the documentation can be improved by having “Configuration” menu item added on the left panel which is dedicated specifically to streamlit configuration. I can see how new users would not think to look in the “Command-line interface” menu item to find the configuration options.