Scheduler Issue - "Not Scheduled" but status says "Scheduled"

Hi all – I’ve seen this before but can’t find any info on it or what it means. This is 2.37.8.

The job is scheduled and the status says “scheduled”, and the “next run” says “not scheduled”.

The behavior is strange, it was working, and now the job is skipped. Anyone seen this before and now a resolution or how to troubleshoot? Is there an endpoint for scheduled jobs I can look at?

1 Like

You can try this endpoint to retrieve job configuration: https://play.dhis2.org/2.37.8/api/jobConfigurations?fields=*&filter=displayName:ilike:Testing Analytics Run 5 PM ET

The details for this can be found in the docs: https://docs.dhis2.org/en/develop/using-the-api/dhis-core-version-238/scheduling.html

Right :+1: Asking @dhis2-frontend about this!


UPDATE:
@chase.freeman thank you for reporting this, would you like to create a jira bug issue https://dhis2.atlassian.net?

Thanks!

2 Likes

Hi @Gassim

We are currently experiencing this issue where scheduled jobs are not running automatically even though the configuration is in tact. Status says “scheduled” but next run says “Not scheduled”. A daily manual run is what has been implemented.

Kindly advise on way forward

2 Likes

Hi @Tobo

What version of dhis2 are you using? Could you share the steps to reproduce?

Thank you!

Thank you!

@Gassim

The client is using version 2.38.2.1 SNAPSHOT
Predictors and respective groups were created. Predictors push data into the next period
3 Schedules for 3 predictor groups were configured to run at 3, 4 and 5am respectively. Relative start is -1200 and relative end is 31
Analytics is set to run at 6am

It was observed that predictors were not pushing data automatically but when schedular is triggered manually, expected data becomes visible.

2 Likes

Hi @Tobo

Thank for the response! To stay on the safe side, I think it’s important to mention that SNAPSHOT is not supposed to be used in production. Please try to use the latest stable release for that version instead of snapshot!

Thanks for the pointer @Gassim

Could that be responsible for the issue at hand?

Thanks! I can’t guarantee that using stable release will resolve the issue (we’ll need to test there first) but as a start I’ve always seen issues posted when using SNAPSHOT instead of stable so you could even expect to face even other issues.

@Gassim isn’t 2.38.2.1 SNAPSHOT just 2.38.2 with the HOT FIX put on? Don’t think this is a “normal” definition of SNAPSHOT.

1 Like

:thinking: Thanks @Matthew_Boddie! I’m not sure, I will need to ask. It seems there’s a new modification which I’m not aware of:

1 Like

Interesting that Phil noted that it was overlooked–this was also true for us for 2.37.8.1-SNAPSHOT being the newest stable release, even with SNAPSHOT attached. Anyway. Clarity seems valuable. Sorry for the tangent!

1 Like

Thank you @Tobo! I have created a bug issue in jira: [DHIS2-14787] - Jira

@chase.freeman, @Tobo, yes, I believe this is a confirmed bug, and the developers are working on it. Thanks!

1 Like

Thanks @Gassim We look forward to a fix.

Regards.

1 Like

@chase.freeman @Tobo : thanks for reporting this.

We’ve discussed this a bit internally. The issue when it says Status: Scheduled, Next run: Not Scheduled occurs because the Next Run date on the server is populated at the time of the last successful run. If something goes wrong at some point, the next run date can fall out of sync, and then we display “Not scheduled” as a kind of fall back.

In terms of the UI, we can update this to display a Next run derived from the cron expression (this will be accurate in most cases, but the scheduler can be a little off, or it could be down and then the next run time that we estimate would be off).

We’re open to other suggestions though if you have ideas for improving the UI. If you’re experiencing this problem regularly, there might be a larger problem with the scheduler failing that we need to look at, so let us know if you have any thoughts. We also discussed briefly the idea of including information about the last successful run in this table, but we’re not sure if that would be helpful either.