Skip to content

Commit

Permalink
docs: rewrite runs section (#1239)
Browse files Browse the repository at this point in the history
Restructed the content with headings & subheadings
Simplified language for clarity
Changed passive voice to active voice where appropriate

---------

Co-authored-by: František Nesveda <[email protected]>
  • Loading branch information
TC-MO and fnesveda authored Oct 10, 2024
1 parent dfdbec3 commit acc2ee8
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 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,21 @@ 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)

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`.
## 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 infinite runs, you can set a timeout. The timeout is specified in seconds, and the default timeout varies based on the template from which you create your Actor. If the run doesn't finish within the timeout, it's automatically stopped, and its status is set to `TIMED-OUT`.

0 comments on commit acc2ee8

Please sign in to comment.