devbox exec don’t need this, because they keep the Devbox awake while they run. A task marker tells the Devbox that work is in progress: while one exists, it stays awake. A marker is a file in the directory $NAMESPACE_DEVBOX_TASKS_DIR points to. The commands below run from your machine with devbox exec. Inside the Devbox, run the quoted command on its own.
For a process that should run until you stop it, such as a dev server, create a service that keeps the Devbox awake instead.
Keep the Devbox awake during the work
Mark work in progress
Create a marker before the work starts. Here the marker is named On Windows:
tests. Name yours after the task.Clear the marker when the work ends
Clear it even if the work fails. A marker doesn’t expire and survives a restart. While one is left behind, the Devbox doesn’t stop for being idle. It keeps running, and is billed for that time, until you clear the marker or stop the Devbox yourself. It still stops at its maximum duration.On Windows:
Find leftover markers
List the markers keeping the Devbox awake, then clear any that are left over. An empty result means none.Related
- Lifecycle for what keeps a Devbox awake.
- Services for processes that should always run.
- Devbox skill to let your agent manage markers for you.