You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: defender-endpoint/schedule-antivirus-scan-anacron.md
+35-24Lines changed: 35 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
1
---
2
-
title: Schedule an antivirus scan using Anacron in Microsoft Defender for Endpoint on Linux
2
+
title: Schedule an antivirus scan using Anacron with Microsoft Defender for Endpoint on Linux
3
3
description: Learn how to schedule an antivirus scan in Microsoft Defender for Endpoint on Linux for better protection of your organization's assets.
4
4
ms.service: defender-endpoint
5
5
ms.author: deniseb
6
6
author: denisebmsft
7
7
ms.localizationpriority: medium
8
-
ms.date: 12/02/2023
8
+
ms.date: 03/24/2025
9
9
manager: deniseb
10
10
audience: ITPro
11
11
ms.collection:
@@ -17,18 +17,15 @@ ms.subservice: linux
17
17
search.appverid: met150
18
18
---
19
19
20
-
# Schedule an antivirus scan using Anacron in Microsoft Defender for Endpoint on Linux
20
+
# Schedule an antivirus scan using Anacron with Microsoft Defender for Endpoint on Linux
21
21
22
22
**Applies to:**
23
23
24
24
- Microsoft Defender for Endpoint for servers
25
25
- Microsoft Defender for Servers Plan 1 or Plan 2
26
26
- Microsoft Defender Antivirus
27
27
28
-
To run a scan of Microsoft Defender Antivirus for Linux, see [Supported Commands](linux-resources.md#supported-commands).
29
-
30
-
> [!NOTE]
31
-
> This article supports Microsoft Defender for Endpoint on Linux for Red Hat Enterprise Linux distributions (RHEL).
28
+
To run a scan of Microsoft Defender Antivirus for Linux, see [Supported commands](linux-resources.md#supported-commands).
32
29
33
30
## System requirements
34
31
@@ -37,23 +34,27 @@ See the following system requirements needed to schedule Microsoft Defender Anti
37
34
- Linux distributions and versions: Red Hat Enterprise Linux 7.2 or higher.
38
35
- The **FANOTIFY** option in kernel must be enabled.
39
36
37
+
Also see [Prerequisites for Microsoft Defender for Endpoint on Linux](mde-linux-prerequisites.md).
38
+
40
39
## Scheduling Microsoft Defender Antivirus scan in Red Hat Linux
41
40
42
-
You can schedule cron jobs to initiate Microsoft Defender Antivirus scans on a schedule. For more information, see [How to schedule scans with Microsoft Defender for Endpoint on Linux](schedule-antivirus-scan-crontab.md). This process works well if the device is always up and running.
41
+
You can [schedule cron jobs to initiate Microsoft Defender Antivirus scans on a schedule](schedule-antivirus-scan-crontab.md). This process works well if the device is always up and running.
43
42
44
-
But if the Linux devices are shut down or offline during the cron schedule, the scan won't run. In these situations, you can use **anacron** to read the timestamp and find the last executed job. If the device was shut down during the scheduled cron job, it needs to wait until the next scheduled time. By using **anacron**, the system will detect the last time the scan was run. If the device didn't run the cron job, it will automatically start it.
43
+
But if the Linux devices are shut down or offline during the cron schedule, scans don't run. In these situations, you can use **anacron** to read the timestamp and find the last executed job. If the device was shut down during the scheduled cron job, it needs to wait until the next scheduled time. By using **anacron**, the system will detect the last time the scan was run. If the device didn't run the cron job, it will automatically start it.
45
44
46
45
### Schedule Microsoft Defender Antivirus scans in Red Hat Linux
3. Review and edit your Anacron file, which contains the following information:
57
58
58
59
```shell
59
60
# /etc/anacrontab: configuration file for anacron
@@ -66,19 +67,24 @@ Use the following steps to schedule scans:
66
67
# delay will be 5 minutes + RANDOM_DELAY for cron.daily
67
68
```
68
69
69
-
1. Note the following items in the file.
70
-
1.**Shell:** Shell is referred as `/bin/sh`, and not as `/bin/bash`. Remember when writing the jobs.
71
-
1.**RANDOM_DELAY:** Describes the maximum time in minutes for the job. This value is used to offset the jobs so there wouldn't be too many jobs running at the same time. Using this delay is ideal for VDI solutions.
72
-
1.**START_HOURS_RANGE:** Describes the time range to run the job.
73
-
1.**cron.daily:** Describes 1 as the period of days required for the frequency of job executions. 5 is the delay in minutes that anacron waits after the device restarts.
70
+
Notice the following items in the file:
71
+
72
+
-**Shell** is referred as `/bin/sh`, and not as `/bin/bash`. Remember this when you're configuring jobs.
73
+
-**RANDOM_DELAY** describes the maximum time in minutes for the job. This value is used to offset the jobs so there aren't too many jobs running at the same time. Using this delay is ideal for VDI solutions.
74
+
-**START_HOURS_RANGE** describes the time range to run the job.
75
+
-**cron.daily** describes `1` as the period of days required for the frequency of job executions. `5 is the delay in minutes that anacron waits after the device restarts.
74
76
75
-
1. Review look at the anacron jobs:
77
+
4. Review your anacron jobs by using the following command:
0 commit comments