Skip to content

Right way to run AdHoc Pipeline #330

Closed

Description

@eoin-o

Hello,

I'm loving airflow, just wanted to clarify the right way to run an adhoc pipeline. We will eventually move to daily batches, but at the moment our pipeline just needs to be run ad hoc. Backfill seems to run all jobs form the start date. So whats the best way to just kick off a chain when needed? Apologies if I've missed something in the documentation!

Thanks!

Activity

  1. artwr commented on Aug 28, 2015

    @artwr
    Contributor

    Depending on what your needs are, there are several ways to help with this:

    • The first one is to define a DAG with {'adhoc': True} in the default_args. This will ensure that the pipeline is not scheduled, and the tasks only run when a manual run/backfill command is issued.
    • If you can formulate your pipeline as depending on a particular trigger (presence of a File, or a partition in Hive, or a key in S3), then it could run daily and only run to process that particular file should you chose to.

    Of course you can combine the approaches.

    Let me know if you need more help.

  2. mistercrunch commented on Aug 28, 2015

    @mistercrunch
    Member

    "Backfill seems to run all jobs form the start date"
    Well only if you don't pass it a start_date, see airflow backfill -h for all the options, but look at -s, -e and -a

    The idea with adhoc=True tasks (note that it is a task level parameter) is that you can squeeze them in a DAG alongside scheduled tasks and have them around, ready for their occasional use cases. You'd then trigger them with an airflow backfill -a [...] command when needed.

    Other options you may consider are to pause individual DAGs in the UI, or simply not run the scheduler at all.

  3. eoin-o commented on Sep 1, 2015

    @eoin-o
    Author

    Thank you both!

  4. added a commit that references this issue on Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions