GitHub Foundations — Question 20
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?
Answer options
- A. on: cron: '45 7 * * 3,6'
- B. on: cron: - schedule: '45 7 * * 3,6'
- C. on: schedule: - cron: '45 7 * * 3,6'
- D. on: schedule: '45 7 * * 3,6'
Correct answer: C
Explanation
The correct answer is C because it properly nests the 'cron' directive under the 'schedule' key, which is necessary in a YAML configuration for scheduling workflows. Options A and D are incorrect due to improper structure, while option B incorrectly places 'schedule' as an array item rather than directly under 'on'.