Ejecutar Código Python Cada X Horas #140
This file contains 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: Ejecutar Código Python Cada X Horas | |
on: | |
schedule: | |
# Ejecutar cada hora | |
- cron: "55 * * * *" | |
workflow_dispatch: # Habilita el disparo manual | |
jobs: | |
run-python: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout código | |
uses: actions/checkout@v3 | |
- name: Configurar Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Instalar dependencias | |
run: | | |
python -m pip install --upgrade pip | |
pip install pytz | |
- name: Ejecutar script Python | |
run: python script.py |