Skip to content

Run Python script every 24 hours #154

Run Python script every 24 hours

Run Python script every 24 hours #154

Workflow file for this run

name: Run Python script every 24 hours
on:
schedule:
- cron: '0 0 * * *' # runs every day at midnight
jobs:
run_script:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: setup node version
uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9' # Use the Python version you need
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt # If you have any requirements
- name: Run Python script
env:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
run: |
python sphinx_webscrape.py
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "updated last run time"
git push