Why are scheduled Actions never executed?

Hi GitHub Community,

I automated several tasks with GitHub Actions. They are really powerful and flexible. I also tried a scheduled triggers like this on different repositories, for example this one:

on:
  push:
    branches:
      - master
    schedule:
      - cron: '0 0 * * *'

Unfortunately the workflow is never executed. I learned in this forum that scheduled triggers have some limitations, so I double checked:

  • These are original repositories, no forks.
  • The schedule is defined on master branch
  • I deleted and created the workflow several times in subsequent commits

It would be great to learn how to successfully trigger scheduled actions as these would greatly improve some of my FOSS dev tasks. Any input welcome!

Cheers,
-marc

I suspect what’s going wrong here is that you’re setting schedule as an attribute of push instead of on, where it is supposed to be. This may work better?

on:
  push:
    branches:
      - master
  schedule:
    - cron: '0 0 * * *'

Indeed :man_facepalming:

I think yaml and me will never become friends.

Good catch @lee-dohm, thank you so much!

1 Like

And now it actually works… thanks again. How can I send a virtual beer? :beer: