Skip to content

Commit 5add845

Browse files
committed
Update schedule-antivirus-scan-anacron.md
1 parent d79b796 commit 5add845

File tree

1 file changed

+21
-14
lines changed

1 file changed

+21
-14
lines changed

defender-endpoint/schedule-antivirus-scan-anacron.md

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,14 @@ But if the Linux devices are shut down or offline during the cron schedule, scan
4747
Use the following steps to schedule scans:
4848

4949
1. Connect to the RedHat server using PuTTY.
50-
1. Edit the anacron file:
50+
51+
2. Edit the anacron file as follows:
52+
5153
```shell
5254
vi /etc/anacron
5355
```
5456

55-
1. :::image type="content" source="media/vi-etc-anacron.png" alt-text="Sample Anacron Job Linux." lightbox="media/vi-etc-anacron.png" link="media/vi-etc-anacron.png":::
57+
3. Review and edit your Anacron file, which contains the following information:
5658

5759
```shell
5860
# /etc/anacrontab: configuration file for anacron
@@ -65,19 +67,24 @@ Use the following steps to schedule scans:
6567
# delay will be 5 minutes + RANDOM_DELAY for cron.daily
6668
```
6769

68-
1. Note the following items in the file.
69-
1. **Shell:** Shell is referred as `/bin/sh`, and not as `/bin/bash`. Remember when writing the jobs.
70-
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.
71-
1. **START_HOURS_RANGE:** Describes the time range to run the job.
72-
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 be 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.
7376

74-
1. Review look at the anacron jobs:
77+
4. Review your anacron jobs by using the following command:
7578

7679
```shell
7780
ls -lh /etc/cron*
7881
```
7982

80-
:::image type="content" source="media/vi-etc-anacron.png" alt-text="Sample Anacron Job Linux." lightbox="media/vi-etc-anacron.png" link="media/vi-etc-anacron.png":::
83+
You should see information similar to what's shown in the following screenshot:
84+
85+
:::image type="content" source="media/vi-etc-anacron.png" alt-text="Sample Anacron Job Linux." lightbox="media/vi-etc-anacron.png" link="media/vi-etc-anacron.png":::
86+
87+
The following code example provides a more detailed view:
8188

8289
```shell
8390
[root@redhat7 /] # ls -lh /etc/cron*
@@ -116,9 +123,9 @@ Use the following steps to schedule scans:
116123
total 0
117124
```
118125

119-
1. Ignore the `/etc/cron.d` directory, you will see `/etc/cron.daily, hourly, monthly, and weekly`.
126+
Ignore the `/etc/cron.d` directory; instead, review `/etc/cron.daily, hourly, monthly, and weekly`.
120127

121-
1. To schedule a weekly antivirus scan, you can create a file (Job) under the ```/etc/cron.weekly``` directory.
128+
5. To schedule a weekly antivirus scan, you can create a file (Job) under the ```/etc/cron.weekly``` directory.
122129

123130
```shell
124131
cd /etc/cron.weekly
@@ -144,7 +151,7 @@ Use the following steps to schedule scans:
144151
Type: wq!
145152
```
146153

147-
1. Change the file permissions to allow the file to be executed.
154+
6. Change the file permissions to allow the file to be executed by using this command:
148155

149156
```shell
150157
Chmod 755 mdavfullscan
@@ -167,13 +174,13 @@ Use the following steps to schedule scans:
167174
[root@redhat7 cron.weekly] #
168175
```
169176

170-
1. Use the command to test the weekly anacron job.
177+
7. Use the following command to test the weekly anacron job:
171178

172179
```shell
173180
./mdavfullscan
174181
```
175182

176-
1. Use the command to verify the job ran successfully.
183+
8. Use the following command to verify the job ran successfully:
177184

178185
```shell
179186
cat /logs/mdav_avacron_full_scan.log

0 commit comments

Comments
 (0)