---
title: "Nightly Housekeeping kills \"Import Runtime\""
description: "Nightly housekeeping in Opsview can cause the \"Import Runtime\" service check to fail due to database deadlocks between housekeeping and import runtime cronjobs. The resolution is to update the import runtime cronjob to exclude the housekeeping time window, preventing conflicts."
url: "https://docs.itrsgroup.com/docs/faq/opsview/33077456836509-opsview-nightly-housekeeping-kills-import-runtime/index.html"
---
## Problem

The "Opsview - Housekeeping Monitor" service check is in WARNING/CRITICAL state

### Related to

Nightly housekeeping of the Opsview databases is controlled by a cronjob that runs at 0311 (server time) under the "opsview" on the orchestrator.

If you are seeing that the import\_runtime (ODW Status) or "Opsview Housekeeping Status" service check is failing failing, then it may well be a conflict (database deadlock) between these two processes.

Example of errors seen

- Import Runtime Error: `[FATAL] There are running dataloads - exiting`
- ODW service check goes into non-OK state: `ODW_STATUS WARNING` or `ODW_STATUS CRITICAL`

## Suggested solution(s)

- Update the opsview users cronjob for import\_runtime to exclude (skip) 0304
- For the purpose of this information, only the import\_runtime cronjob is shown with the "-eu" command below, but there are many others within that output

|  |
| --- |
| **Warning:** If the scripts hasn't run for a long time, you should disable them in crontab before running them manually, then re-enable them after. This prevents duplicate processes while they catch up.   - Adding a hash, as per the below will perform this "disable" action |

```
~]# crontab -eu opsview
...
## 4 * * * * . /opt/opsview/coreutils/bin/profile && /opt/opsview/coreutils/bin/import_runtime -q
...
```

To implement the suggested solution update cronjob entry as per the below (0-2,5-23)

- Modify Import Runtime Crontab for Opsview

```
## crontab -eu opsview
4 0-2,4-23 * * * . /opt/opsview/coreutils/bin/profile && /opt/opsview/coreutils/bin/import_runtime -q
```

## Related article(s)

- [Opsview Data Warehouse (ODW)](https://docs.itrsgroup.com/docs/opsview/current/monitoring/reports/opsview-data-warehouse-odw/index.html#i-get-an-error-there-are-running-dataloads-existing-from-import_runtime)
- [Opsview 6.x Release Notes](https://docs.itrsgroup.com/docs/all/opsview/opsview-release-notes/index.html#Heading-overview), [Opsview 6.x Known Issues](https://docs.itrsgroup.com/docs/all/opsview/opsview-known-issues-6x/index.html#ubuntu-20), [Upgrade Notes](https://docs.itrsgroup.com/docs/opsview/current/upgrade-notes/overview/index.html)
- [Support Policy](https://docs.itrsgroup.com/docs/opsview/current/support/opsview-support-policy/index.html), [Supported Operating Systems](https://docs.itrsgroup.com/docs/opsview/current/prerequisites/compatibility-matrix/supported-os/index.html)


