Skip to content

Run Python Script Daily #40

Run Python Script Daily

Run Python Script Daily #40

name: Run Python Script Daily
on:
schedule:
- cron: '0 0 * * *' # Triggers the workflow to run at 00:00 UTC every day
workflow_dispatch: # Allows manual triggering of the workflow
jobs:
run-script:
runs-on: windows-latest # Specifies that the job should run on a Windows machine
steps:
- name: Checkout repository
uses: actions/checkout@v2 # Checks out the repository so that the workflow can access the code
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.13.1' # Sets up Python 3.13.1 environment
- name: Install dependencies if not present
run: |
pip freeze > installed.txt
pip install --upgrade -r requirements.txt
- name: Run script
run: python scripts/main.py # Runs the main.py script