How do I run a task from another task?
# prefect-community
a
How do I run a task from another task?
c
Hi Alex - assuming you want access to another task’s runtime logic, you can do:
Copy code
@task
def my_main_task():
    output = other_task.run() # this runs another task
    ...
note that I interpreted you to mean “re-use logic from another task” -
other_task
in my example will not show up in the Prefect UI or be orchestrated / retried / etc by Prefect in this example
a
ah thanks for the info! yeah I wanted to re-use the logic from another task
c
awesome - anytime!