> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/action-center/compare/compare-with-specific-date.md).

# Compare With Specific Date

**Compare With Specific Date** narrows the assets passed along a workflow to what changed. It runs the Condition node's saved query against the completed discovery that ended on a specific date, then compares that old result with the current one. Depending on **direction**, it passes on the assets that are new in the current result (**Added**) or the assets that were in the old result but are gone now (**Removed**).

It works like **Compare With Day**, but you pick a calendar date instead of a number of days. See [Compare With Day](broken://pages/2bc4676122a353079a13dd4fef3b0b6044f2577f) and [Compare With Last Discovery](broken://pages/38b9579684e9d7950622a0e3f09f2146b2ab4143).

### Before you begin

* Connect the job directly after a **Condition node**. The job compares that condition's query. Without a condition on the previous node, the job is skipped and the log says "Compare job has been skipped. It must be connected to condition node."
* A completed discovery must end on the chosen date. If none is found, the job is skipped with a warning and the assets pass on unchanged.
* The job accepts these asset types: device, user, application, vulnerability, certificate, service, source code, AI, domain and policy.
* Each asset is matched by a key column, which the job requires in the node's columns:

| Asset type                                                  | Key column       |
| ----------------------------------------------------------- | ---------------- |
| device                                                      | `Hostname`       |
| user, certificate, service, source code, AI, domain, policy | `PrimaryKey`     |
| application                                                 | `NameAndVersion` |
| vulnerability                                               | `Id`             |

* The job has no connection fields, so nothing is required in [Action Center Settings](broken://pages/2bc5a56c2dcb8ef89cc0d72d4c41b59f8d5561f1).

### Settings

| Setting       | Type   | Required | Default                 | Description                                                                                                                                                      |
| ------------- | ------ | -------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| direction     | Choice | No       | `Added`                 | `Added` passes assets that are in the current result but not in the old one. `Removed` passes assets that were in the old result but are not in the current one. |
| compare\_date | Date   | Yes      | None (may be left null) | The date on which the discovery to compare with ended.                                                                                                           |

### How it works

1. The job finds the first completed, non-deleted discovery whose end time falls on `compare_date`.
2. For every selected asset type, it runs the Condition node's query text on that old discovery and collects the key values of the matches.
3. It compares those with the assets currently flowing in the workflow. It runs once per asset type, not once per asset.
4. It replaces the workflow's assets with the result and marks each one with a `compare_status` value:

| direction | Condition                                          | `compare_status`    |
| --------- | -------------------------------------------------- | ------------------- |
| Added     | The asset did not exist in the old discovery       | `new_machine`       |
| Added     | The asset existed but did not match the query then | `parameter_added`   |
| Removed   | The asset is not in the current discovery          | `removed_machine`   |
| Removed   | The asset still exists but no longer matches       | `parameter_removed` |

For **Removed**, the passed-on assets are the old records from the earlier discovery. The next job node receives only these assets. If nothing changed, it receives none for that asset type.

### Example

Find devices that match a condition now but did not match on a chosen date.

| Node                       | Value                                           |
| -------------------------- | ----------------------------------------------- |
| Condition                  | Saved query: devices without antivirus          |
| Compare With Specific Date | direction: `Added`, compare\_date: `2026-01-15` |
| Next job                   | A notification job, for example Send Mail       |

### What's next?

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Compare With Day</strong></td><td>Compare with the discovery from x days ago.</td><td><a href="broken://pages/2bc4676122a353079a13dd4fef3b0b6044f2577f">Broken link</a></td></tr><tr><td><strong>Compare With Last Discovery</strong></td><td>Compare with the previous discovery and skip small changes.</td><td><a href="broken://pages/38b9579684e9d7950622a0e3f09f2146b2ab4143">Broken link</a></td></tr><tr><td><strong>About Action Center</strong></td><td>Workflows, triggers, conditions and job nodes.</td><td><a href="broken://pages/770677b93eb449b2e9819d4c13d63e600c9d490b">Broken link</a></td></tr></tbody></table>
