GitHub Actions cron not ran until merged to main

One9twO
Jul 12, 2024

I added a GitHub Actions workflow to run every 15 minutes

name: My Workflow

on:
schedule:
- cron: '*/15 * * * *'

After fixing the obvious things (making sure workflow is not disabled etc), it was still not running.

Turns out it only started after merging the Pull Request to main.

This makes sense because you might not want the same workflow running together on all the branches. I wonder if there’s a setting to allow crons to run on non-main branches.

--

--

One9twO
One9twO

Written by One9twO

A security engineer who shifts things left

No responses yet