https://dagster.io/ logo
#ask-community
Title
# ask-community
f

Francis Addae

03/31/2022, 4:55 PM
What’ s the best way to run a scheduler on a pipeline. just started using Dagster. Im more acclimated to the Perfect Scheduler but want to learn how Dagster Scheduler implementation NEED HELP ASAP 🙏
o

owen

03/31/2022, 4:59 PM
hi @Francis Addae, the easiest way to get a job run on a schedule would be to add something like
Copy code
ScheduleDefinition(job=my_job, cron_schedule="0 0 * * *")
to your repository. Our docs have a bunch more examples for other scenarios as well: https://docs.dagster.io/concepts/partitions-schedules-sensors/schedules#a-basic-schedule
f

Francis Addae

03/31/2022, 5:01 PM
I’m running a n ETL with dbt resources embedded. Is it possible to run scheduler with that?
o

owen

03/31/2022, 5:02 PM
you can run any job on a schedule, regardless of if it has resources or not
f

Francis Addae

03/31/2022, 5:03 PM
How would i add a scheduler in this instance?
Copy code
#Call the files 
@job(resource_defs= {'dbt': dbt_run})
def main():
    e = dagETL.extract_data()
    t = dagETL.transform(e)
    l = dagETL.loading(t)
    d = dbt_run_op(l)
    
    
if __name__ == "__main__":
    result = main.execute_in_process()
    <http://logger.info|logger.info>(result)
you'll need to be running the dagster-daemon, which will kick off runs of your job according to the schedule you defined
f

Francis Addae

04/01/2022, 2:17 PM
I cant install dagster-daemon on my computer. Also i tried running a couple of examples on the docs and nothing works
o

owen

04/01/2022, 5:58 PM
when you install dagster, dagster-daemon should be included as well. basically, if you can run
dagster --help
, you should also be able to run
dagster-daemon --help
. if those don't work, let me know what error you're running into
2 Views