Troubleshooting your schedule
Try these steps if you're trying to run a schedule and are running into problems. This document assumes that you are using the default scheduler on your instance, which executes your schedules in the dagster-daemon service. See the migration guide for instructions on how to migrate to this scheduler.
Step 1: Is your schedule included in your repository and turned on?¶
The left-hand navigation bar in Dagit shows all of the schedules for the currently-selected repository, with a green dot next to each schedule that is running. Make sure that your schedule appears in this list with a green dot. To ensure that Dagit has loaded the latest version of your schedule code, you can press the reload button next to your repository name to reload all the code in your repository.
- If Dagit is unable to load the repository containing your schedule (for example, due to a syntax error or a problem with one of your definitions), there should be an error message in the left nav with a link that will give you more information about the error.
- If the repository is loading but the schedule doesn't appear in the list of schedules, make sure that your schedule function is included in the list of schedules returned by your repository function.
- If the schedule appears but doesn't have a green dot next to it, click on the name of the schedule, then toggle the switch at the top of the screen to mark it as running.
Step 2: Is your schedule interval set up correctly?¶
When you click on your schedule name in the left-hand nav in Dagit, you'll be taken to a page where you can view more information about the schedule. If the schedule is running, there should be a "Next tick" row near the top of the page that tells you when the schedule is expected to run next. Make sure that time is what you expect (including the timezone).
Step 3: Is the schedule interval configured correctly, but it still isn't creating any runs?¶
It's possible that the
dagster-daemon process that submits runs for your schedule is not working
correctly. If you haven't set up
dagster-daemon yet, check the Deploying Dagster
section to find the steps to do so.
First, check that the daemon is running. Click on "Status" in the left nav in Dagit, and examine the "Scheduler" row under the "Daemon statuses" section. The daemon process periodically sends out a heartbeat from the scheduler, so if the scheduler daemon is listed as "Not running", that indicates that there's a problem with your daemon deployment. If the daemon ran into an error that caused it to throw an exception, that error will often appear in this UI as well.
If there isn't a clear error on this page, or if the daemon should be sending heartbeats but isn't,
you may need to check the logs from the daemon process. The steps to do this will depend on your
deployment - for example, if you're using Kubernetes, you'll need to get the logs from the pod
that's running the daemon. You should be able to search those logs for the name of your schedule
SchedulerDaemon to see all logs associated with the scheduler) to gain an understanding of
what's going wrong.
Finally, it's possible that the daemon is running correctly, but there's a problem with your schedule code. Check the "Latest tick" row on the page for your schedule. If there was an error while trying to submit runs for your schedule, there should be a red "Failure" box next to the time. Clicking on the box should display an error with a stack trace showing you why the schedule couldn't execute. If the schedule is working as expected, it should display a blue box instead with information about any runs that were created by that schedule tick.
If these steps didn't help and your schedule still isn't running, reach out in Slack or file an issue and we'll be happy to help investigate.