Skip to content

CICD-007 · Schedule a weekly check ​

Encyclopedia · Events and triggers · All snippets

Previous · CICD-006 · Next · CICD-008

1. Where it fits ​

  • Placement .github/workflows/ci.yml, at workflow level, or within jobs for a named job mapping.
  • Prerequisites workflow on an example repository with main as default.
  • Platforms github-actions, gitea-actions.

2. Copy the snippet ​

yaml
on:
  schedule:
    - cron: "23 4 * * 1"

3. How it works ​

Cron fields are minute, hour, day of month, month and day of week. The default schedule here is UTC. It initiates CI independently of a new commit.

4. Verify the result ​

Interpret UTC and expect best-effort timing on the default branch.

Watch for. Place event filters at workflow scope and test an event that should run and an event that should be skipped.

Validation syntax-validated (YAML parse). Status definitions.