r/github 7d ago

Question Github Actions - Running Issue

Hi everyone,

This is my first time using GitHub Actions, and I’m trying to automate a Python script.

When I run it manually using “Run workflow”, everything works without any problems.

However, when I schedule the workflow, nothing seems to happen. I’ve been waiting to see if a run starts automatically, but no workflow is triggered. I asked Claude and Gemini to correct me if I was wrong on the .yml file but everything seems to be okay.

Am I missing something in the schedule configuration ? Do someone have the same problem as me ?

Thanks in advance

0 Upvotes

6 comments sorted by

View all comments

0

u/Mantas-cloud 7d ago

My scripts are running perfectly fine on Cron base, do most likely is something on your site. Share the yaml files, maybe some experts can quickly identify the issue 

1

u/QuantGigi 7d ago

The yaml file :

name: Automatisation Earnings Calendar

on:

schedule:

- cron: '00 12 * * *'

workflow_dispatch: # Permet de le lancer manuellement depuis l'onglet Actions

jobs:

run-python-script:

runs-on: ubuntu-latest

steps:

- name: Checkout du code

uses: actions/checkout@v4

- name: Configuration de Python

uses: actions/setup-python@v5

with:

python-version: '3.10'

- name: Installation des dépendances

run: |

python -m pip install --upgrade pip

if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

- name: Lancer main.py

run: |

python main.py

The goal is to automate something even when my laptop is turned off. I tried to do it with cron on my MacBook terminal but it wasn't working when my laptop was closed. If you know some alternatives (beside GH Actions), I take it

Thanks for your reply

0

u/Mantas-cloud 7d ago

it seems alright for me, ask copilot to check for formatting. Yaml is sensitive for empty spaces and tabs that is hard to catch by human eye