Skip to main content

Stream a bot executor cron job

import botfleet

botfleet.api_key = "YOUR_API_KEY"

cron_job = botfleet.BotExecutorCronJob.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.