| id | manage-tasks-for-reusable-input |
|---|---|
| title | Manage tasks for reusable input |
import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import CodeBlock from '@theme/CodeBlock';
import TasksAsyncExample from '!!raw-loader!./code/02_tasks_async.py'; import TasksSyncExample from '!!raw-loader!./code/02_tasks_sync.py';
When you need to run multiple inputs with the same Actor, the most convenient approach is to create multiple tasks, each with different input configurations. Task inputs are stored on the Apify platform when the task is created, allowing you to reuse them easily.
The following example demonstrates how to create tasks for the apify/instagram-hashtag-scraper Actor with different inputs, manage task clients, and execute them asynchronously: