actions / actions/runner

Cron scheduled returns stale cron expression after updating workflow schedule triggers

Open
#4,241 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
6.3k
Forks
1.4k
Avg merge
1d 16h
Merged PRs (30d)
24

Description

GitHub Actions Scheduled Workflow Bug Report

Describe the bug

Scheduled workflow runs fire with a stale github.event.schedule cron expression
that no longer exists in the workflow file. The scheduler's internal state does not
sync with the updated workflow YAML on the default branch, causing runs to receive
an outdated cron string.

To Reproduce

  1. Create a workflow on the default branch with a schedule trigger:

    on:
      schedule:
        - cron: '*/5 * * * *'  # every five minute
    
  2. Merge it. Confirm scheduled runs fire with github.event.schedule = */5 * * * *.

  3. Update the cron expression and push to the default branch:

    on:
      schedule:
        - cron: '*/10 * * * *'  # every 10 minutes
    
  4. Wait for the next scheduled trigger.

  5. Observe that github.event.schedule still evaluates to */5 * * * * (the old
    expression), not */10 * * * *.

Expected behavior

github.event.schedule should contain the cron expression currently defined in
the workflow file (*/10 * * * *), not the previously removed one (*/5 * * * *).

Runner Version and Platform

GitHub-hosted runner (ubuntu-latest). This is not a self-hosted runner issue.

What's not working?

The scheduled workflow fires with a cron expression that was removed from the workflow file. Any workflow logic that routes bxased on github.event.schedule (which is the documented way to distinguish between multiple schedules) breaks because the value doesn't match any current schedule definition.

Our real-world case:

We updated our scheduled from

on:
  schedule:
    - cron: '0 5 * * *'
    - cron: '0 5 * * 6'

to:

on:
  schedule:
    - cron: '0 5 * * 1-5' # updated
    - cron: '0 5 * * 6'

After merging to main, the scheduler still fires with 0 5 * * *, causing our
case statement (which routes config based on github.event.schedule) to fail:

Error: Unknown schedule: 0 5 * * *

Job Log Output

Failed run: https://github.com/ava-labs/firewood/actions/runs/21894045008/job/63206127030

From the debug logs, github.event.schedule evaluates to the old value:

##[debug]....Evaluating String:
##[debug]....=> 'schedule'
##[debug]..=> '0 5 * * *'

The workflow file being executed is the correct/current version (the case
statement contains the new cron branches), confirming the YAML on main is up to
date — only the scheduler's trigger payload is stale.

Details

  • Repository: ava-labs/firewood

  • Workflow: .github/workflows/track-performance.ymlC-Chain Reexecution Performance Tracking

  • Cron syntax in the workflow (current, on main):

    schedule:
      - cron: '0 5 * * 1-5'
      - cron: '0 5 * * 6'
    
  • Stale cron received by runner: 0 5 * * *

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The report names .github/workflows/track-performance.yml and a failed Actions run; start by comparing the current workflow schedule with the run's github.event.schedule debug output. No runner source file or test is identified, so first determine whether the behavior is represented in this repository; done would require a reproducible test and a confirmed fix for stale schedule payloads.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions
Domain
ci-cd
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.