# Script Limits

## **Script Limits**

Because cortex scripts execute within a multi-tenant environment, there are limits in place to ensure that runaway scripts do not monopolize shared resources.

### **Execution Limits**

Below are the default limits enforced per Cortex script execution

| Description                                                              | Default Limit       |
| ------------------------------------------------------------------------ | ------------------- |
| Job timeout (maximum execution time for a Cortex Job)                    | 10,000 milliseconds |
| Route timeout (maximum execution time for a Cortex Route)                | 5,000 milliseconds  |
| Trigger timeout (maximum execution time for a Cortex Trigger)            | 5,000 milliseconds  |
| Notifications (maximum number of email, push, and/or sms notifications)  | 100                 |
| Callouts (maximum number of http module requests per script execution)   | 5                   |
| Callout timeout (maximum time for an http module request)                | 30,000 milliseconds |
| Callout request size (maximum size for an http module request)           | 524.288 Kilobytes   |
| Callout response size (maximum size for an http module request response) | 524.288 Kilobytes   |
| Execution depth (maximum levels of nested cortex script executions)      | 4                   |
| Max operations (Jobs, Triggers, and Routes)                              | 1,000,000           |

### **Daily limits**

| Description                                   | Default Limit |
| --------------------------------------------- | ------------- |
| Job runs (maximum number of job runs per day) | 24            |

### **General Limits**

| Description                                                     | Default Limit     |
| --------------------------------------------------------------- | ----------------- |
| Cortex script size (maximum character limit of a cortex script) | 50,000 characters |

In addition to the above limits, the following limitations are enforced within Cortex scripts.

* Callouts to Cortex API endpoints are not allowed within a Cortex script. Use the CortexObject class and its methods for interacting with Cortex Objects in scripts, instead.
* Callouts are not allowed in in-line triggers
* Triggers are not allowed on the Views, Scripts, Org and Objects objects

##


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.medable.com/cortex-api/scripting/script-limits.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
