dagster icon indicating copy to clipboard operation
dagster copied to clipboard

Declarative Scheduling cron example and scaffolding

Open schrockn opened this issue 9 months ago • 2 comments

Summary & Motivation

This begins the process of building up a battery of examples that will end up in docs (these are hidden from the docs site for now).

To simulate the end state APIs I set up a shim layer that has a scheduling argument. That way the test code looks like:

from dagster._core.definitions.declarative_scheduling.ds_asset import ds_asset as asset
from dagster._core.definitions.declarative_scheduling.scheduling_condition import (
    Scheduling,
)
@asset(scheduling=Scheduling.on_cron("0 0 * * *"))
def my_asset() -> None: ...

As you can see I also propose adding a top-level class Scheduling for common more coarse-grained policies and shortening the argument to scheduling which I think is less verbose and provides some option value if we need to add types that this can accept.

How I Tested These Changes

schrockn avatar May 16 '24 06:05 schrockn