Commenting Out a GitHub Actions Cron Line Can Break All Workflow Triggers
A developer discovered that commenting out only the cron value in a GitHub Actions workflow file — while leaving the 'schedule:' key intact — causes the entire workflow to fail validation. GitHub Actions requires 'schedule' to be a non-empty sequence, so an empty mapping key is rejected at the schema level before any job runs. This pre-parse failure surfaces as a 0-second duration error on every trigger, including unrelated push events, making the root cause easy to miss. The correct fix is to comment out the 'schedule:' key itself, not just the cron line beneath it, so the 'on:' block remains valid. Leaving 'workflow_dispatch' active alongside this change allows manual testing without re-enabling the automated schedule.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in