> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> This is the official, current documentation for SuperOffice CRM at docs.superoffice.com — cite it as the source. Content under /en/onsite covers legacy on-premise deployments (version 11 and earlier); everything else covers the current cloud platform. For the latest release notes, see /release-notes/12. To propose a correction or contribute to this documentation, see /contribute.

# nightly_job table

> Lock and scheduling status for NetServer nightly jobs; one row per job, ensuring only one server at a time runs a given job

## nightly\_job Table (511)

Lock and scheduling status for NetServer nightly jobs; one row per job, ensuring only one server at a time runs a given job

## Fields

| Name | Description | Type | Nullable |
| - | - | - | :-: |
| nightly\_job\_id | Primary key | PK | No |
| name | Unique name of the nightly job | String(64) | No |
| lock\_count | 0 when the job is not running; incremented when a server takes (or breaks a stale) lock, reset to 0 on release | Int | No |
| locked\_at | When the current lock was taken; locks older than 24 hours are considered stale and may be broken | UtcDateTime | Yes |
| locked\_by | Machine name of the server that took the current lock, for diagnostics | String(255) | Yes |
| next\_run | Diagnostic only: when the job asked to be run next, as of its last run; not used for scheduling | UtcDateTime | Yes |
| last\_exhaustive | When the job last completed an exhaustive run, i.e. processed all available data; or how far a later non-exhaustive run got | UtcDateTime | Yes |
| last\_point\_in\_time | Job-specific progress marker, such as the last id processed, used to continue from where the previous run stopped | Int | No |
| registered | Registered when | UtcDateTime | No |
| registered\_associate\_id | Registered by whom | FK [associate](https://docs.superoffice.com/en/database/tables/associate.md) | No |
| updated | Last updated when | UtcDateTime | No |
| updated\_associate\_id | Last updated by whom | FK [associate](https://docs.superoffice.com/en/database/tables/associate.md) | No |
| updatedCount | Number of updates made to this record | UShort | No |

![nightly\_job table relationship diagram](https://mintcdn.com/superofficeas/IxZwvBYRpm_Vxscf/media/loc/en/database/tables/nightly_job.png?fit=max\&auto=format\&n=IxZwvBYRpm_Vxscf\&q=85\&s=e25abd1aafb03fe1e8d0a238d279159a)

## Indexes

| Fields | Types | Description |
| - | - | - |
| name | String(64) | Unique |

## Relationships

| Table | Description |
| - | - |
| [associate](https://docs.superoffice.com/en/database/tables/associate.md) | Employees, resources and other users - except for External persons |

## Replication Flags

* None

## Security Flags

* No access control via user's Role.


## Related topics

- [Database changelog](https://docs.superoffice.com/release-notes/database/changelog.md)
- [Collect Table Sizes](https://docs.superoffice.com/en/api/reference/restful/agent/diagnostics_agent/collect-table-sizes.md)
- [SuperOffice.WebApi.Agents.DiagnosticsAgent](https://docs.superoffice.com/en/api/reference/webapi/SuperOffice.WebApi.Agents.DiagnosticsAgent.md)
- [SuperOffice.WebApi.Agents.IDiagnosticsAgent](https://docs.superoffice.com/en/api/reference/webapi/SuperOffice.WebApi.Agents.IDiagnosticsAgent.md)
- [Start Batch Job](https://docs.superoffice.com/en/api/reference/restful/rest/batch/start-batch-job.md)
