C.W.K.
Stream
Lesson 13 of 14 · published

예약 workflow

~9 min · schedule, cron, nightly

Level 0Apprentice
0 XP0/101 lessons0/10 achievements
0/120 XP to next level120 XP to go0% complete

YAML 의 cron

on: schedule + cron 표현식 = 반복 일정에 workflow 실행. UTC, 5-필드 cron, repo 에 활동 있어야 함 (60일 commit 없음 = scheduled workflow 일시정지).

흔한 패턴

  • Nightly full test suite — 길고 비싼 matrix 를 매일 밤 — PR 은 smoke subset 만 보게.
  • Dependency 업데이트 — Dependabot 이 해주지만, 일정에 npm outdated, pip-audit 등도 돌릴 수 있어.
  • 보안 스캔 — 주간 CodeQL, 월간 trivy.
  • Stale issue / PR 정리actions/stale.
  • Health check — prod URL 주기적 curl + 실패 시 Slack 알림.

주의

  • 항상 UTC.
  • 피크 부하 시 GitHub 가 scheduled run 지연 가능 — 밀리초 정확도 의존 금지.
  • 같은 workflow 에 workflow_dispatch 짝 — 디버깅 위해 수동 실행 가능.

Code

Nightly + 수동·yaml
name: nightly
on:
  schedule:
    - cron: '0 6 * * *'    # daily at 06:00 UTC
  workflow_dispatch: {}

jobs:
  full-test:
    runs-on: ubuntu-latest
    timeout-minutes: 60
    steps:
      - uses: actions/checkout@v4
      - run: ./run-full-suite.sh

External links

Exercise

06:00 UTC 에 느린 test matrix 도는 nightly workflow 추가, workflow_dispatch 와 짝. 수동 trigger 해서 도는 거 보고; 하루 밤 기다려서 schedule 발화 확인.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.