Skip to content

Perpetual Scripts

A normal script runs once per job and stops. A perpetual script is the opposite: when its run ends — for any reason, including a clean exit — Orvanta immediately queues a new run of the same script, and keeps doing so until someone cancels it. That turns a script into a long-lived process, which is the pattern to reach for when a script needs to keep watching or holding a connection open rather than run-and-exit.

Open the script’s Settings, go to the Runtime tab, and toggle Perpetual script. The toggle is stored with the script’s other runtime settings, so it only takes effect after you deploy — toggling it in a draft doesn’t restart anything on its own.

Cancelling the currently running job stops that instance, but since the script is perpetual, a new run starts right behind it unless you also turn the setting off. To stop it for good, either cancel the run and disable Perpetual script in Settings, or use Scale down to 0 on the script’s Current runs view, which cancels every in-flight run of that script at once.

Perpetual scripts are the building block for a long-running consumer — for example, a script that opens a connection to a Kafka topic and processes messages as they arrive rather than polling on a schedule. See Kafka triggers for the trigger-based alternative when a schedule or event trigger fits better than a standing process.