You can just write a function that receives the schedule_interval and
prepares and return a dag object. Call it twice with 2 different
schedule_intervals.

You should also be able to copy.deepcopy the dag object and alter the
schedule_interval of the copy, but that's not as clean.

Max

On Sun, Jun 5, 2016 at 11:51 AM, Jeremiah Lowin <[email protected]> wrote:

> It would be useful to have a DAG.copy() method, then you could duplicate it
> and change the schedule interval of the copy. I can't remember if there is
> a copy() method though -- but I think theres a subdag method which
> effectively does the same thing.
>
> On Sun, Jun 5, 2016 at 2:17 PM <[email protected]> wrote:
>
> > Hi,
> > Is it possible to define a DAG with two different scheduling intervals?
> > I have a DAG with 3 tasks defined in it, the schedule interval is
> > "@weekly" but I also want to run it every month, without duplicate the
> > entire DAG/code.
> > Thanks
>

Reply via email to