Scheduled Job Log State Not Updating When Flow Runs

When a scheduled flow runs, the State field in the Scheduled Job Log always stays as Scheduled, even while the flow is running or pending completion.

Is this expected behavior? If so, what’s the best way to track the real execution status of a scheduled flow (e.g., Running, Completed, Failed) and link it back to the Scheduled Job Log ID for reporting?

Comments

  • This is expected behavior. The State field in the Scheduled Job Log represents the status of the scheduling trigger itself, not the execution status of the flow. Once a scheduled job fires, the flow instance runs independently, and its progress is not reflected by changes in the job log state.

    To track execution status in real time:

    1. Use a Database Query Definition step within the flow to query the job_schedule_log table.
    2. Retrieve the most recent log entry using an ORDER BY When_Started DESC clause.
    3. Map the Scheduled Job Log ID into the FlowData and link it to your reporting structure.
    4. Optionally, include the Instance Name (from FlowData) to ensure accurate tracking in clustered environments.

    This approach allows you to establish a one-to-one relationship between the Flow ID and Scheduled Job Log ID, enabling detailed reporting on the execution status of scheduled flows.

Sign In or Register to comment.