손상된 "cron"gh-action 작업 흐름

손상된 "cron"gh-action 작업 흐름

연습으로 다음 GitHub Actions 워크플로를 작성했습니다.

name: Cron CI

# Controls when the workflow will run
on:
  # Triggers the workflow every day minutes
  schedule:
    - cron: "01 10 * * 6,7"
    - cron: "01 10 * * 1,2,3,4,5"

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
  # This workflow contains a single job called "cron"
  cron:
    # The type of runner that the job will run on
    runs-on: ubuntu-latest

    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
      # Runs a single command using the runners shell
      - name: Run working script

        if: github.event.schedule != '01 10 * * 1,2,3,4,5'
        run: echo "Wake up! Grab a brush and put a little makeup"

      - name: Run resting script
        if: github.event.schedule != '01 10 * * 1,2,3,4,5'
        run: echo "It's not time to make a change! Just relax, take it easy."

제가 보기에는 맞는 것 같지만 오류 로그가 표시됩니다 invalid cron attribute "01 10 * * 6,7". 이 오류를 이해하도록 도와주실 수 있나요?

[1]https://github.com/trouchet/sappio/actions/runs/3807658008/workflow

답변1

다음과 같이 수정했습니다.

  1. 시작 번호를 제거합니다 0.
  2. 0대신 일요일로 사용하세요 7.

이제 괜찮아!

관련 정보