Harbor's Scan-All Schedule Only Accepts a Custom Cron

Harbor's scanAll schedule API takes a type field with Hourly, Daily, and Weekly presets — and rejects all three with the same 400. Only Custom, with an actual cron string, and None actually work.

Harbor's Scan-All Schedule Only Accepts a Custom Cron

Harbor's system-wide scanAll schedule endpoint takes a type field, and the API documentation lists the obvious presets: Hourly, Daily, Weekly, Custom, None. The test set each preset in turn to see which ones the API actually accepts.

Three presets, one error, verbatim

Setting type: Custom with an explicit cron string succeeded outright:

HTTP 201
{"schedule":{"cron":"0 */10 * * * *","type":"Custom"},"status":"Running", ...}

Setting type: Hourly, type: Daily, and type: Weekly — with no cron string, since a preset shouldn't need one — all failed with the identical error:

HTTP 400
{"errors":[{"code":"BAD_REQUEST","message":"invalid cron string for
scheduled scan all: , error: empty cron string is invalid"}]}

Same message, same code, for all three presets. The API's validation path doesn't special-case the named presets into a fixed cron expression the way the label implies — it just checks whether a cron string was supplied, and none of the presets supply one. type: None was the only other value that worked, returning HTTP 200 and turning the schedule off.

Hourly, Daily, and Weekly all return the same 400; Custom and None are the only two that work
Hourly, Daily, and Weekly all return the same 400; Custom and None are the only two that work

Three presets rejected with an identical error. Custom (with a cron string) and None are what actually work.

The schedule proves itself

With a custom cron of 0 */2 * * * * set, the test polled the schedule status and one fixture's last scan timestamp for several minutes without touching either. The scan end time moved on its own — 12:10:04, 12:12:05, 12:14:03 — matching the two-minute interval exactly, with no push and no manual trigger anywhere in the test. Whatever the preset UX gets wrong, the underlying scheduler mechanism, once given a real cron string, does exactly what it says.

No equivalent schedule for SBOM generation

The same test checked whether SBOM generation has its own recurring schedule, the way vulnerability scanning does — a natural question, since Harbor's project settings expose auto_sbom_generation right next to auto_scan. Hitting /api/v2.0/system/sbomAll/schedule returned:

HTTP 404
{"errors":[{"code":"NOT_FOUND","message":"path /api/v2.0/system/sbomAll/schedule was not found"}]}

The endpoint doesn't exist. There is no system-wide "regenerate every SBOM on a schedule" control to configure, correctly or otherwise — SBOM generation happens at scan or push time and nowhere else.

What this means for the runbook

If you're scripting Harbor's scan schedule — Terraform, a setup script, a day-one bootstrap job — the preset names in the UI are not a safe API contract. Skip straight to type: Custom with a real cron string; it's the only preset-shaped value that has ever worked in this environment, and it's also the only one that lets you pick an interval that isn't hourly, daily, or weekly.

Next: the RWO volume that hangs your upgrade forever — turning on secret and config scanning triggers a helm upgrade that never finishes.