Scheduled jobs with cron
A Mochi.cron() job appends one entry to an in-memory log every minute. The browser subscribes over a WebSocket and shows each new row the moment it lands.
<script>
import CronLog from './CronLog.svelte';
import { files } from './files.ts';
const sources = await loadSources(files);
</script>
<CronLog mochi:hydrate />
More demos
Hydration Modes How the hydration modes work — mochi:hydrate, mochi:hydrate:visible, rootMargin tuning, and mochi:defer server islands side by side. Data Loading How server-side data loading works — fetch on the server, cache with MochiCache, and render at request time. Font loading How font loading works — ship fonts via @fontsource packages or standalone .woff2 files, automatically bundled and linked from the page head.