Yes, you can set up event-based triggers using the open source version of the Prefect server. The automations API enables further programmatic customization of trigger and action policies based on arbitrary events. Triggers can be configured not only in reaction to events, but also proactively: to trigger in the absence of an event you expect to see. For example, in the case of flow run state change triggers, you might expect production flows to finish in no longer than thirty minutes. But transient infrastructure or network issues could cause your flow to get “stuck” in a running state. A trigger could kick off an action if the flow stays in a running state for more than 30 minutes. This action could be on the flow itself, such as canceling or restarting.
You can host your own Prefect server by using the
prefect server start
CLI command in the terminal. Open the URL for the Prefect server UI (
http://127.0.0.1:4200 by default) in a browser to access it. The self-hosted Prefect server and Prefect Cloud share a common set of features, with Prefect Cloud also including user accounts and workspaces.
For more details, you can refer to the
Prefect Automations Documentation and the
Prefect Server Hosting Guide.