Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 46 additions & 8 deletions sources/platform/actors/development/builds_and_runs/runs.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,53 @@ slug: /actors/development/builds-and-runs/runs

---

When you start an Actor, it creates a run. The run is a single execution of your Actor with a specific input. The run is a Docker container running your Actor build with the input you provided.
When you start an Actor, you create a run. A run is a single execution of your Actor with a specific input in a Docker container.

You can start an Actor in multiple ways:
## Starting an Actor

1. Manually from the [Apify Console](https://console.apify.com/actors) UI.
2. Via [Apify API](https://docs.apify.com/api/v2#/reference/actors/run-collection/run-actor).
3. Using [Scheduler](../../../schedules.md) provided by the Apify platform.
4. By one of the available [integrations](../../../integrations/index.mdx).
You can start an Actor in several ways:

The run gets input passed to it via the `INPUT` record of its default [key-value store](../../../storage/key_value_store.md). In addition to this, environment variables are also passed to the run. You can find more information about environment variables in the [Environment variables](../programming_interface/environment_variables.md) section.
- Manually from the [Apify Console](https://console.apify.com/actors) UI
- Via the [Apify API](https://docs.apify.com/api/v2#/reference/actors/run-collection/run-actor)
- Using the [Scheduler](../../../schedules.md) provided by the Apify platform
- By one of the available [integrations](../../../integrations/index.mdx)

## Input and environment variables

The run receives input via the `INPUT` record of its default [key-value store](../../../storage/key_value_store.md). Environment variables are also passed to the run. For more information about environment variables check the [Environment variables](../programming_interface/environment_variables.md) section.

## Run duration and timeout

Actor runs can be short or long-running. To prevent an indefinite runs, you can set a timeout. The timeout is specified in seconds and varies between Actor templates. If the run doesn't finish within the timeout, it's automatically stopped, and its status is set to `TIMED-OUT`.

Depending on the template used for your Actor, the default timeout values may differ.

| Template name | Default timeout value in seconds |
|:---|:---|
| Scrapy | 3600 |
| Start with Python | 3600 |
| BeautifulSoup | 3600 |
| Playwright + Chrome | 3600 |
| Selenium + Chrome | 3600 |
| Empty Python project | 3600 |
| Standby Python project | 3600 |
| Crawlee + BeautifulSoup | 3600 |
| Crawlee + Playwright + Chrome | 3600 |
| Start with JavaScript | 360 |
| Start with TypeScript | 360 |
| Crawlee + Cheerio | 3600 |
| Crawlee + Puppeteer + Chrome | 3600 |
| Crawlee + Playwright + Chrome | 3600 |
| Bootstrap CheerioCrawler | 3600 |
| Crawlee + Cheerio | 3600 |
| Crawlee + Puppeteer + Chrome | 3600 |
| Crawlee + Playwright + Chrome| 3600 |
| Playwright + Chrome Test Runner | 3600 |
| Empty Typescript project | 3600 |
| Standby Typescript project | 3600 |
| Cypress | 3600 |
| Empty JavaScript project | 3600 |
| Standby JavaScript project | 3600 |
| LangChain | 3600 |
| Start with TypeScript on Bun | 360 |

Actor runs can be long or short. To prevent an indefinite run, you can set a timeout. The timeout is specified in seconds and is set to 300 seconds by default. If the run does not finish within the timeout, it is automatically stopped, and the run's status is set to `TIMEOUT`.