Hi, sorry but I can't figure out why my schedule i...
# ask-community
j
Hi, sorry but I can't figure out why my schedule is not getting picked up by the
dagster-daemon
and I'm not seeing it in the dagit UI ..
dagster-daemon run -w dagster-workspace.yaml
Copy code
@schedule(
    cron_schedule="* * * * *",
    pipeline_name="my_job",
    job=my_job,
)
def my_job_schedule(context):
    # Find runs of the same job that are currently running
    run_records = context.instance.get_run_records(
        RunsFilter(job_name="my_job",
                   statuses=[DagsterRunStatus.STARTED]))

    # Kick off a run only if no other runs of the same job are running
    if len(run_records) == 0:
        yield RunRequest()
🤖 1
I'm assuming the daemon has the schedule daemon inside of it so I don't need
dagster schedule start
, that cmd is giving me
There are no schedules defined for repository
also
r
your schedule should be contained in your
@repository
that you specified in your workspace.yaml. Could you show your repository definition?
j
dagster-workspace.yaml
->
Copy code
load_from:
  - python_file:
      relative_path: data/workflow-recommendations.py
in
workflow-recommendations.py
, I only have the @job decorator , do i need the @repository as well?
okay, i added @repository and i'm seeing the schedule in the UI now. didn't know i needed it.. I think i got it. Thanks for the response
r