Stream an agent executor cron job
import swarmnode
swarmnode.api_key = "YOUR_API_KEY"
cron_job = swarmnode.AgentExecutorCronJob.retrieve(id="15d19ca3-26f1-4adb-9cea-3955b73d9b4e")
for execution in cron_job.stream():
print(execution)
Whenever a new execution is created by the cron job, the stream()
method will yield an Execution
object. The stream()
method can be used to process the executions as they are created in real-time.