# Monitor scheduled GitLab CI pipelines with HookPulse

after_script reports each scheduled run to HookPulse, success or failure, from the job status.

HookPulse · Updated 2026-10-14

## Step 1. Create the monitor

Add a routine named gitlab-backup and set how often the job runs. Its page shows the check-in URL: use it in place of https://hookpulse.net/in/YOUR_ID.

## Step 2. Save the check-in URL as a variable

In Settings, CI/CD, Variables, add HOOKPULSE_URL with the check-in URL, masked.

## Step 3. Add the check-in to the job

after_script also runs when the script fails, and CI_JOB_STATUS tells which one happened.

```
backup:
  image: alpine:3.20
  rules:
    - if: $CI_PIPELINE_SOURCE == "schedule"
  script:
    - ./backup.sh
  after_script:
    - apk add --no-cache curl
    - |
      if [ "$CI_JOB_STATUS" = "success" ]; then curl -fsS -m 10 --retry 3 "$HOOKPULSE_URL"
      else curl -fsS -m 10 --retry 3 "$HOOKPULSE_URL/fail"; fi
```

## Step 4. Run it once

Run the pipeline schedule once from Build, Pipeline schedules. The routine shows the first check-in. From then on, a missed or failed run sends the alert.

[Create the monitor](https://hookpulse.net/?routine=gitlab-backup&every=86400#routines)

[Monitor scheduled GitLab CI pipelines with HookPulse](https://hookpulse.net/guides/gitlab-ci)
