On this page
#Crawling and Scheduling
A crawl is HTTP, HTML-to-text and FTS inserts — no model, no tokens. That is the point: the model is spent when you ask a question; the crawler runs on a timer.
aemon crawl add hono-docs https://hono.dev --include /docs --max-pages 250
aemon crawl run --due-hours 12 --limit-sources 6 # one scheduled pass
aemon crawl status
#Discovery
In order:
- An explicit sitemap.
<base>/sitemap.xml.Sitemap:lines inrobots.txt./sitemap_index.xml,/sitemap-0.xml(sitemap indexes are followed two levels).- A one-level link walk.
Real numbers: kubernetes.io 6 958 URLs, docs.astro.build 5 992, pydantic 2 004, helm.sh 497.
#Politeness and incrementality
robots.txtDisallow rules are honoured, one request per source at a time, with a configurable delay (default 250 ms) and a descriptive User-Agent.ETag/If-Modified-Sinceplus a content hash make a pass incremental. An unchanged pass costs one 304 per page and writes nothing (measured: 30 fetched, 0 changed).- Progress carries across runs: unseen URLs are crawled before already-indexed ones,
deepest pages first, so a repeated
--max-pages 50pass keeps extending the corpus instead of re-walking the top of the site.
#Scheduling
deploy/ ships aemon-crawl.service and aemon-crawl.timer:
crawl run --due-hours 12 --all-due --max-pages 400 # oneshot, Nice=10, idle IO
daily at 09:17 ± 30 min
Enable with:
systemctl --user link $PWD/deploy/*.service $PWD/deploy/*.timer
systemctl --user enable --now aemon-crawl.timer
Two settings look redundant and are not:
--all-duematters. With a fixed--limit-sources, a 20-source list took a week to cycle, so "every 48 hours" was only a floor.--due-hoursis enforced inside the crawler, so a duplicated or manual run does nothing.--due-hoursmust stay strictly below the timer's period. A successful crawl stampslast_run = now; when--due-hoursequals the period, every fire finds sources only as old as the period minus that run's jitter, nothing clears the threshold, and the pass exits0 sources, 0 fetchedin milliseconds while looking green. The shipped pair is daily + 12 h, which refreshes each source at most once a day.
The due-window arithmetic is pinned by a test against the real clock, because the alternative was a timer that fired forever and crawled nothing.
#Status
aemon crawl status lists each source with its last run and age in hours; --json
adds the same fields under result.sources.