Schedule a Health scan
A scheduled scan keeps the health score, the history and the remediation tracker current even when nobody opens the console, and alerts the profile’s webhook only when a check turns into a new problem.
You need: the admin role in the console, and on the Harbor machine the Windows account the console runs as. The scan runs as a Windows scheduled task.
1. Make sure the scan can connect on its own
Section titled “1. Make sure the scan can connect on its own”A scheduled scan has no one to sign in, so it connects with the profile’s declared service account and reads only its declared secret source, as the Windows account the task runs as.
- In Harbor Home, open the gear menu, Tenant & service account.
- Under Service account (this console’s own vault identity), check that a service account is declared and where its secret comes from. Pick a source the task’s Windows account can read without a prompt: Stored on this machine (DPAPI, this Windows account) stored by that same account, a SecretManagement vault it can open unattended, or an environment variable in that account’s user scope.
- A secret source of Typed at Connect (never stored) cannot run unattended: the task fails at once.
The details are in Service account and secret sources. Harbor Health needs admin-grade CyberArk rights for system health; a least-privilege Onboard service user gets a 403 on those checks.
2. Register the schedule
Section titled “2. Register the schedule”- In the Health console, open Tracking → History (History).
- In Scheduled scans, set Daily at (the Harbor server’s local time), or pick or every 4, 6, 8 or 12 hours.
- Select Schedule scans. The card now says Registered, runs as a Windows scheduled task. with the next run.
To change it, set new values and select Update schedule; Remove schedule deletes the task (the stored scans stay).
3. Check the first runs
Section titled “3. Check the first runs”- Until the first start time, the card says The task has not run yet.
- The first run is a baseline: it is stored and tracked, but alerts nothing.
- Each later run is compared with the previous full scan; the card shows the new, resolved and unchanged problems, and the webhook is called only for new ones. Webhooks are set up per profile, see Webhooks / notifications.
- Last scheduled run FAILED (code N) means the task ran but could not scan: check the service account’s secret source first, then the Harbor Health log.
From PowerShell
Section titled “From PowerShell”Register-HarborHealthSchedule -ConfigProfile <profile> -At 06:00Register-HarborHealthSchedule -ConfigProfile <profile> -EveryHours 6Get-HarborHealthSchedule -ConfigProfile <profile> # next run, last resultUnregister-HarborHealthScheduleSee Register-HarborHealthSchedule, Get-HarborHealthSchedule and Invoke-HarborHealthScheduledScan.
Covers Harbor Onboard 0.59.0 / Harbor Health 0.22.0. On an older release? Upgrading and the release notes list what changed.
