Keep Streamlit App Alive #431
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Keep Streamlit App Alive | |
| on: | |
| schedule: | |
| # Run every 6 hours to keep app active (more frequent than 12-hour hibernation) | |
| - cron: '0 */6 * * *' | |
| # Also run every 2 hours during business hours (9 AM - 5 PM UTC) | |
| - cron: '0 9-17/2 * * *' | |
| workflow_dispatch: # Allow manual trigger | |
| jobs: | |
| ping-app: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Ping Streamlit App | |
| run: | | |
| echo "Pinging Streamlit app to keep it alive..." | |
| curl -f -s -o /dev/null https://clipabit-demo1.streamlit.app/ || { | |
| echo "Failed to ping app" | |
| exit 1 | |
| } | |
| echo "Successfully pinged app - it will stay active with frequent monitoring!" |