DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to schedule a pipeline to run on a cron with Prefect

Serve a Prefect flow as a deployment with a cron schedule and parameters.

Short answer: Install with pip install -U prefect; then 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. All steps.

  • Data and analytics
  • Intermediate
  • 30 minutes
  • From the README
  • Claude Code
  • Codex
  • Cursor
  • Gemini CLI

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

  1. Install with pip install -U prefect
  2. Replace the script's entry point with flow.serve, giving it a name, a cron expression and parameters, as in the README
  3. Run the script; it stays up and looks for scheduled runs
  4. Trigger extra runs manually from the UI or CLI when you need them
  5. 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

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer