Run audits, backups, smoke tests, or dependency checks on a schedule.
Section: Branching and trigger patterns
Nightly scheduled workflow
yaml
yaml
on:
schedule:
- cron: "0 6 * * *"Explanation
Schedules are ideal for recurring maintenance and longer-running jobs that do not need to run on every commit.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Branching and trigger patterns
Deploy only from main
Restrict production deployment to your protected main branch.
Minimal Jenkins declarative pipeline
Run checkout, install, test, and build in a Jenkinsfile.