# ScheduledJobRunInfo

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Reference](https://developer.m-files.com/APIs/gRPC-API/Reference/index.md) > [Messages](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ScheduledJobRunInfo/

Struct for a scheduled job run info.

- **Full name:** `MFiles.ScheduledJobRunInfo`
- **Proto file:** [`mfiles/structs.proto`](https://developer.m-files.com/APIs/gRPC-API/downloads/proto/mfiles/structs.proto)

<a id="fields"></a>

## Fields

| Field | Type | Number | Description |
|---|---|---|---|
| <a id="f-is_running"></a>`is_running` | `bool` | 1 | True if the job is currently running. |
| <a id="f-next_run_utc"></a>`next_run_utc` | [`google.protobuf.Timestamp`](https://protobuf.dev/reference/protobuf/google.protobuf/#timestamp) | 2 | The next time the job will run. Zero to indicate no next run time. |
| <a id="f-last_run_utc"></a>`last_run_utc` | [`google.protobuf.Timestamp`](https://protobuf.dev/reference/protobuf/google.protobuf/#timestamp) | 3 | The last time the job ran. Zero to indicate that the job has never run (or is still running for the first time). |
| <a id="f-last_run_succeeded"></a>`last_run_succeeded` | `bool` | 4 | True if the last run at ftLastRun was successful, false otherwise. |
| <a id="f-last_run_errors"></a>`last_run_errors` | `string` | 5 | Error string from the last run (if any). |
| <a id="f-last_run_cancelled"></a>`last_run_cancelled` | `bool` | 6 | True if the job is cancelled. |
| <a id="f-current_step"></a>`current_step` | `int32` | 7 | -1 or a current job step. 0 indicates the beginning. When positive, value depends on the underlying job that is being executed. Steps are numbered sequentially from 1 to forward. |
| <a id="f-curent_step_completion"></a>`curent_step_completion` | `int32` | 8 | -1 or the completion percent of a current job. This is always an estimate. |
| <a id="f-output"></a>`output` | [`ScheduledJobOutputInfo`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ScheduledJobOutputInfo/index.md) | 9 | The output information on the job. Available only when the job is not running (e.g. bRunning and is false). |

<a id="used-by-methods"></a>

## Used by methods

- [IRPCBackgroundOperationsAdmin.GetBackgroundOperationStatus](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCBackgroundOperationsAdmin/GetBackgroundOperationStatus/index.md): Gets the run state of a background operation, such as an external object type refresh.
- [IRPCScheduledJobsAdmin.AddScheduledJob](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCScheduledJobsAdmin/AddScheduledJob/index.md): Adds a scheduled job to the server or to the vault, depending on the job type.
- [IRPCScheduledJobsAdmin.GetScheduledJob](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCScheduledJobsAdmin/GetScheduledJob/index.md): Gets one scheduled job and its run state.
- [IRPCScheduledJobsAdmin.GetScheduledJobRunInfo](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCScheduledJobsAdmin/GetScheduledJobRunInfo/index.md): Gets the run state of a scheduled job: running or not, last and next run, errors and progress.
- [IRPCScheduledJobsAdmin.GetScheduledJobs](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCScheduledJobsAdmin/GetScheduledJobs/index.md): Gets the scheduled jobs of the server (server-level session) or of the vault (vault session), with their run state.
- [IRPCScheduledJobsAdmin.ModifyScheduledJob](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCScheduledJobsAdmin/ModifyScheduledJob/index.md): Replaces the definition of an existing scheduled job.

<a id="used-in-fields"></a>

## Used in fields

- [`GetBackgroundOperationStatusResponse.scheduled_job_run_info`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCBackgroundOperationsAdmin/GetBackgroundOperationStatus/index.md#response): The run state of the operation: running or not, last and next run, errors and progress.
- [`GetScheduledJobRunInfoResponse.scheduled_job_run_info`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCScheduledJobsAdmin/GetScheduledJobRunInfo/index.md#response): The run state of the job.
- [`GetScheduledJobsResponse.run_infos`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCScheduledJobsAdmin/GetScheduledJobs/index.md#response): The run state of each job, at the same index as in `jobs`.
- [`AddScheduledJobResponse.run_info`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCScheduledJobsAdmin/AddScheduledJob/index.md#response): The run state of the new job.
- [`ModifyScheduledJobResponse.run_info`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCScheduledJobsAdmin/ModifyScheduledJob/index.md#response): The run state of the job after the change.
- [`GetScheduledJobResponse.run_info`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCScheduledJobsAdmin/GetScheduledJob/index.md#response): The run state of the job.
