🍡 mochi
← All demos

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.

connecting
<script>
  import CronLog from './CronLog.svelte';
</script>

<CronLog mochi:hydrate />