nerdexam
Microsoft

GH-200 · Question #90

You are a DevOps engineer in ABC Corp. You need to schedule your deployment workflow twice a week at 7:45 UTC every Wednesday and Saturday. What is the appropriate YAML structure?

The correct answer is C. on. GitHub Actions uses standard cron syntax for scheduled workflows under the 'schedule' event. The correct cron expression for 7:45 UTC on Wednesday and Saturday is '45 7 3,6' - where '45' is the minute, '7' is the hour (UTC), '' covers every day/month, and '3,6' specifies…

Author and Maintain Workflows

Question

You are a DevOps engineer in ABC Corp. You need to schedule your deployment workflow twice a week at 7:45 UTC every Wednesday and Saturday. What is the appropriate YAML structure?

Options

  • Aon:
  • Bon:
  • Con:
  • Don:

How the community answered

(33 responses)
  • A
    15% (5)
  • B
    6% (2)
  • C
    73% (24)
  • D
    6% (2)

Explanation

GitHub Actions uses standard cron syntax for scheduled workflows under the 'schedule' event. The correct cron expression for 7:45 UTC on Wednesday and Saturday is '45 7 * * 3,6' - where '45' is the minute, '7' is the hour (UTC), '*' covers every day/month, and '3,6' specifies Wednesday (day 3) and Saturday (day 6) of the week. The YAML structure should be: 'on: schedule: - cron: "45 7 * * 3,6"'. Option C contains this correct cron expression. The other options (A, B, D) contain incorrect cron values that do not match the specified day-of-week and time requirements.

Topics

#GitHub Actions#Workflow scheduling#Cron expressions#YAML syntax

Community Discussion

No community discussion yet for this question.

Full GH-200 Practice