Hey :wave: We have a job that is mainly triggered ...
# ask-community
Hey 👋 We have a job that is mainly triggered by a sensor that detects if there's new or changed data. We want to ensure that the job runs at least once per day, regardless of data changes. To achieve this we have a setup a schedule for the job that runs once per day but we'd want to skip the scheduled run if there has been a successful run on the same date. As a solution I found this https://github.com/dagster-io/dagster/discussions/8414 where we'd pull run records from the context using
. What do you think of this? What other options do we have? Thanks 🙂
The GraphQL API https://docs.dagster.io/concepts/webserver/graphql could also be used here. Would this be a more stable option? The context.get_run_records is listed as an internal functionality and therefore subject to change.
hi @Simo Tumelius! That solution is what I'd recommend, and is the most direct way to answer "are there any successful runs for this job on this date".
is used heavily internally and is unlikely to change in any significant way.
👌 1
Thanks for the confirmation @owen :) We'll go with that