Runaway cron

We have a monorepo with a scheduled workflow to update our Swift Package Manager dependencies. We use Dependabot for non-SPM dependencies, configured with weekly runs early Monday morning.

This morning we discovered GitHub Actions had run our SPM workflow 9 times, off master, off the same commit. Prior to this, Dependabot created 10 pull requests for other dependencies.

Why would the scheduler run a master branch scheduled workflow 9 times instead of once?

2 Likes

Hi @ydnar ,

The schedule events works as expected on my side. Hence, could you please show me the corn setting of your schedule event? And did the pull request will merge&update the schedule setting?

Please change the corn to a new timepoint and observe if multiple workflows still persist. I checked the github status site, there is a hint on Mar22 that delays for Actions jobs have recovered. I assume it could be a temporary issue.

Thanks

Hi @weide-zhou:

Here’s the cron setting for the workflow:

name: Dependencies

on:
  # push:
  # branches:
  # - <your branch name here>
  schedule:
    - cron: "* 13 * * 1" # 13:00 UTC every Monday

Hi @ydnar ,

In your corn setting, you didn’t specify the first value(minute) but use ‘*’ , which means every minute in 13rd hour  UTC Mon as a trigger. Due to another rule(github minimum interval 5 mins), multiple workflow appears then. 

Please specify a value for minute, eg:

schedule:
    - cron: "10 13 * * 1" # 13:10 UTC every Monday

Thanks.

2 Likes

Thanks!