Who it is forA data engineer who needs a pipeline to run every hour without managing crontab.
The problemCron jobs are hard to monitor, rerun or parameterise.
The outcomeA long-running process that executes the flow on schedule and can also be triggered from the UI or CLI.
What you need first
- Python 3.11 or later
- pip or uv
- Optional: a Prefect Cloud account instead of a self-hosted server
Steps
- Install with
pip install -U prefect - Replace the script's entry point with flow.serve, giving it a name, a cron expression and parameters, as in the README
- Run the script; it stays up and looks for scheduled runs
- Trigger extra runs manually from the UI or CLI when you need them
- Use event triggers from the automations docs to run deployments in response to events
Prompt for your agent
With PrefectHQ/prefect, make <flow> a deployment with .serve(name="<name>", cron="<schedule>", parameters=<params>), run it, and show me how to trigger an extra run from the CLI.
Caveat. The serve process must keep running for scheduled runs to happen; production setups are covered in the deploy docs.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for PrefectHQ/prefect and "Schedule a pipeline to run on a cron"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer