Does anyone know if it is possible to kick off a s...
# ask-community
a
Does anyone know if it is possible to kick off a script in a different git repo in a prefect flow?
a
hi Arun! you should be able to grab the script and run it as a task. you may want to use a ShellTask to capture the output you need from it!
a
Hi Allison! How would I point to the command that is located on a different repo?
a
I'm not quite sure I follow your question, could you explain what you're looking for?
a
Sure, There's a python script
foo.py
located in a git repo
repo1
. I've set up my prefect flow in a different repo
repo2
. As part of my flow, I want to run this
foo.py
script, so it would look something like this
Copy code
with Flow("hello-world") as flow:
     script_output = ShellTask(repo1.foopy)
I'm not bound to ShellTask, alternatives are welcome too 🙂
a
thanks for that! Looking at your example, I think the best plan would be to register your dependent script as a Flow, and use the
StartFlowRun
task to call it when you need it. Hope that helps, let us know if you need more info!