Tutorial: Scheduled Pipeline
In this tutorial you will build a nightly pipeline that runs dependency audits and sends a Slack notification with the results.
Time: ~10 minutes Export target: GitHub Actions
What you'll build
A pipeline that runs every night at 2:00 AM and:
- Checks for outdated dependencies
- Runs a security audit
- Notifies a Slack channel with the result
Step 1 — Save the Slack webhook
- Go to Settings → Credentials → New Credential
- Fill in:
- Label:
Slack Webhook — #alerts - Provider:
slack - Value:
https://hooks.slack.com/services/...(your Slack incoming webhook URL)
- Label:
- Save
Step 2 — Create the pipeline
Open your project, click New Pipeline → name it nightly-audit.
Step 3 — Configure the trigger
Click Trigger:
- Type: Schedule
- Cron:
0 2 * * *(every day at 2:00 AM UTC)
Step 4 — Add the Audit stage
Add a stage named Audit.
Double-click to enter it. Add a job:
- Name:
dependency-audit - Runs on:
ubuntu-latest
Add steps:
Step 1 — Checkout
- Type:
git/ Operation:checkout
Step 2 — Install dependencies
- Type:
shell_command - Script:
npm ci
Step 3 — Check for outdated packages
- Type:
shell_command - Script:bash
npm outdated || true - Label:
Check outdated packages
(The || true prevents the job from failing if there are outdated packages — we want to report, not block.)
Step 4 — Security audit
- Type:
shell_command - Script:bash
npm audit --audit-level=high - Label:
Security audit
Step 5 — Notify Slack
- Type:
notification - Channel:
slack - Credential:
Slack Webhook — #alerts - Message:
✅ Nightly audit completed for my-app
TIP
To send different messages on success vs. failure, add two notification steps: one with Continue on error enabled on the audit step, and conditionals in the YAML. This is easier to set up directly in the YAML after exporting.
Step 5 — Save and export
Click Save then Export → GitHub Actions → Download.
Commit nightly-audit.yml to .github/workflows/.
Result
The pipeline will run every night at 2:00 AM. If the security audit finds high-severity vulnerabilities, the job will fail and GitHub will send you an email notification. Either way, Slack receives a message.
Adjusting the schedule
To change the frequency, update the trigger in pipel8ne and re-export:
| Goal | Cron |
|---|---|
| Every Monday at 9 AM | 0 9 * * 1 |
| Every 6 hours | 0 */6 * * * |
| First of each month | 0 0 1 * * |
| Weekdays at 8 AM | 0 8 * * 1-5 |
