TASK_RUN_STALLED_EXECUTING error.
Code that blocks the event loop for too long (for example, a tight loop doing synchronous work on a large dataset) can prevent heartbeats from being sent. In that case, use heartbeats.yield() inside the loop so the runtime can yield to the event loop and send a heartbeat. You can call it every iteration; the implementation only yields when needed.
TASK_RUN_STALLED_EXECUTING, see Task run stalled executing in the troubleshooting guide.
Sending progress to Trigger.dev
To stream progress or status updates to the dashboard and your app, use run metadata. Callmetadata.set() (or metadata.append()) as the task runs. The dashboard and Realtime (including runs.subscribeToRun and the React hooks) receive those updates as they happen. See Progress monitoring for a full example.
Sending updates to your own system
Trigger.dev doesn’t push run updates to external services. To send progress or heartbeats to your own backend (for example Supabase Realtime), call your API or client from inside the task when you want to emit an update—e.g. in the same loop where you callheartbeats.yield() or metadata.set(). Use whatever your stack supports: HTTP, the Supabase client, or another SDK.
