Workflows and Scheduling behavior

I’ve been trying to understand how and where workflows execute, some observations:

  • a workflow process with a cron schedule can exit (via keyboard interrupt), but the workflow continues calling the activities on the cron schedule
  • a scheduling process can create a schedule and exit and the same thing happens

So, clearly the schedule is running in the server, but it appears, so is the workflow. Which leaves me with questions, this is using the Python SDK:

  • why when a cron schedule is given in the workflow execute does the promise not resolve, even though it could? Asyncio.run will keep the process running, but not if there is no cron schedule.
  • if when using a Schedule, the workflow has logic that executes activities based on the response of another activity, or some other state, how is that handled? Is that bad practice? I see there are examples of workflows that do just that, saga pattern etc. I just can’t put together how that works.

Thanks for any enlightenment here.

Can you give more info on this keyword interrupt? Do you shut down service or your worker or client that started and is waiting on workflow exec results?

Stopping (terminating for example) workflow execution does not just stop your pending (currently running) acrivities to keep running on worker until they complete / fail / heartbeat. This is not specific to cron executions