cd /news/ai-tools/hf-jobs-can-i-delete-cron-job-histor… · home › topics › ai-tools › article
[ARTICLE · art-168306] src=discuss.huggingface.co ↗ pub= topic=ai-tools verified=true sentiment=· neutral

HF Jobs: Can I delete cron job history?

Hugging Face's HF Jobs offers no way to delete individual run receipts: `hf jobs cancel` only stops a running job and `hf jobs scheduled delete` removes the schedule, not the runs it already created, and the Python API (`list_jobs`, `inspect_job`, `cancel_job`, `fetch_job_logs`, `run_job`, `run_uv_job`) exposes no pruning method either. The recommended fix is to drop the polling cron job and instead create a bucket webhook that starts a Job directly, so each run corresponds to a real upload event; the guide also suggests setting a name and labels on scheduled jobs and filtering with `hf jobs ls -a --name bucket-watch --status failed`, since the default `hf jobs ps -a` view caps at 100 entries. The full pattern, including webhook payload fields such as `updatedFiles`, is documented in Hugging Face's webhook guide for processing new bucket files with Jobs.

read2 min views1 publishedNov 12, 2026

On the delete part, the honest answer is no: there is no way to remove individual run receipts right now. hf jobs cancel only stops a running job, and hf jobs scheduled delete removes the schedule, not the runs it already created. The Python side is the same surface (list_jobs, inspect_job, cancel_job, fetch_job_logs, run_job, run_uv_job), so there is nothing to prune with there either.

The better news is that your workflow does not need the polling job at all. A webhook on the bucket can start a Job directly, so you get one run per real upload event instead of one run per tick. The history still gets an entry per run, but every entry then corresponds to actual work, which is the part that was bothering you.

Shape of it:

hf jobs run --flavor cpu-basic --timeout 2h \
  -e OUTPUT_BUCKET=you/analysis-out \
  ghcr.io/astral-sh/uv:python3.12-bookworm \
  uv run https://huggingface.co/.../analyze.py
hf webhooks create --job-id <job id> \
  --watch bucket:you/incoming \
  --domain repo --secrets HF_TOKEN
event = json.loads(os.environ.get("WEBHOOK_PAYLOAD", "{}"))
for f in event.get("updatedFiles", []):
    if f["action"] != "add":
        continue
    path, size = f["path"], f["size"]
    ...

Details that matter in that setup:

--secrets HF_TOKEN instead of to the Job. If you want to keep the cron for other reasons, the next best thing is making the history readable rather than shorter. Set a name and labels on the scheduled job, then filter instead of scrolling:

hf jobs ls -a --name bucket-watch --status failed
hf jobs ls -a --label kind=watcher
hf jobs ps -a --limit 0   # default view caps at 100

Two more things that help with the noise: fold the detect step and the analysis step into one job so each tick leaves one receipt instead of two, and have the job append a JSONL line (timestamp, files seen, action taken) to a log file in a bucket or dataset repo. Then that file is the one place you read, and the receipt list becomes something you only open when something failed.

The full pattern is written up here, including the payload fields: Webhook guide: Process new files in a bucket with Jobs · Hugging Face

I set up a fair number of these watcher pipelines for client automations, and dropping the poll loop is almost always what fixes the clutter, not pruning anything afterwards.

── more in #ai-tools 4 stories · sorted by recency
── more on @hugging face 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/hf-jobs-can-i-delete…] indexed:0 read:2min 2026-11-12 · —