Bruno Murino

08/26/2021, 1:50 PM
Hi everyone — I’m have a flow that I want to run just one, immediately after I deploy it — is there a way to specify that on a schedule? I’m thinking about a
Schedule(clocks=[DatesClock([ pendulum.now() ])])
but I think the lag between running this and registering/deploying the flow would make it so that it doesn’t run, and I’m hesitant about hardcoding an “add 10 minutes” or something to it as doesn’t feel very robust

Kevin Kho

08/26/2021, 1:56 PM
Hey @Bruno Murino, I think you can use the Client and GraphQL API to create a flow run and put any datetime that has already passed and it will run as soon as possible.
query = """mutation {
    create_flow_run(input: { 
    flow_id: "5ac80adc-442a-4e53-bc01-d9d65bffd6aa"}) {