Limits per Run

Limits per Run

Every Scriptbox run has a stated, enforced budget. A limit you can see beats an outage you can't: a runaway loop dies at the deadline with its logs intact, instead of the platform killing the invocation with no record at all.

Console footer listing 15s runtime, 128MB memory and 200 API calls per run

Console footer showing runtime, memory and API limits

## The per-run budget

These apply to every server-side run unless a trigger below overrides them.

Limit Value Why
Wall clock (console) 15 seconds Forge kills a console invocation at 25s; the gap leaves room to return logs and record the run
Memory 128 MB QuickJS heap cap, enforced by the VM
Stack 2 MB VM stack cap
REST calls 200 Stops a runaway loop from hammering your site
Log entries 500, each up to 10,000 characters Keeps responses inside Forge's payload limit
Result size 512 KB Oversized results are replaced with a notice — never silently truncated

25 seconds is a platform ceiling, not a preference. Past it Forge kills the invocation outright: no logs, no run history, no recorded firing.

Budgets by trigger

Trigger Time budget Notes
Console run 15s Also used by Run now on a scheduled job
Event listener 20s per event delivery Shared by every listener bound to that event — three listeners get one clock between them, not three
Scheduled job 60s per job All jobs due on one tick share a 4-minute tick budget; jobs past it are deferred to the next tick, not dropped
Scripted field 10s and 50 REST calls per batch Jira asks for a batch of issues at once — one JQL search for the batch, never one call per issue
Script validator 5s Someone is waiting on the transition. Fails closed: an error or timeout blocks it
Post function 20s Runs after the transition, asynchronously
Jira Automation action 45s Forge allows this class of invocation 55s
Behaviour 1 second Runs in the browser while someone uses the form; no network, no timers

A script that genuinely needs longer than the console allows belongs on a scheduled job, not in a bigger number here.

Size limits

Item Limit
Script source 100,000 characters
Script, listener, job and behaviour names 120 characters
One storage value 200 KB per key — split larger data across keys
Scheduled-job input 10,000 characters of JSON
Listener project scope 50 projects (leave empty for every project)
Behaviour script 30,000 characters; 50 affected fields; 200 project × issue type × view contexts
Scripted-field cache lifetime 0 to 86,400 seconds
Migration analysis 100 scripts per analysis

Other hard edges

  • Five minutes is the scheduling floor. Forge wakes the app every five minutes, so a job written as */1 * * * * runs once per tick.
  • Types are erased, not checked. A type error is a runtime error.
  • No import. There is no module system; import is rejected with an explanation.
  • No multipart. Attachment uploads and binary content cannot cross the sandbox boundary.

When a run hits a limit, the error names it. Troubleshooting lists the common ones and what to change.