Home > database >  Schedule on weekdays
Schedule on weekdays

Time:09-17

Is there any way we can avoid running scheduled github actions on weekends (Saturday and Sunday)? As of now I am running it twice a day daily.

# Controls when the action will run.
on:
  schedule:
  - cron: "30 18 * * *"
  - cron: "30 22 * * *"

CodePudding user response:

In a single entry:

on:
  schedule:
    cron:
      - 30 18,22 * * 1-5

CodePudding user response:

on:
  schedule:
  - cron: "30 18 * * 1-5"
  - cron: "30 22 * * 1-5"

As per https://en.wikipedia.org/wiki/Cron#Overview

  • Related