Which two Statements are true concerning the configuration and use of cron and anacron?

Which two Statements are true concerning the configuration and use of cron and anacron?

Which two Statements are true concerning the configuration and use of cron and anacron?

A.
Anacron jobs are used to make sure cron jobs run if the system had been down when they
were meant to run.

B.
All crontabs are held in the /etc/cron.d directory.

C.
Cron jobs may run as frequently as once a minute.

D.
Anacron jobs may run as frequently as once a minute.

E.
The crond daemon looks for jobs only in /etc/crontab.

Explanation:

Note: Anacron is the cron for desktops and laptops.
Anacron does not expect the system to be running 24 x 7 like a server.
When you want a background job to be executed automatically on a machine that is not running
24 x 7, you should use anacron.
Incorrect:
not D: /etc/anacrontab file has the anacron jobs mentioned in the following format.
period delay job-identifier command
Field 1 is Recurrence period: This is a numeric value that specifies the number of days.
1 – daily
7 – weekly
30 – monthly
N – This can be any numeric value. N indicates number of days



Leave a Reply 7

Your email address will not be published. Required fields are marked *


Djuro

Djuro

Correct answers are A,C

*****

*****

Answer: C and ?

cron allows you to schedule jobs to run as often as every minute. If the system is down when a job is scheduled, cron does not run the job when the system restarts.

anacron allows you to schedule a system job to run only once per day. However, if a scheduled (anacron) job has not been run, that job runs when the system restarts.

The crond daemon executes scheduled tasks on behalf of cron and it starts anacron once every hour.

crond looks in /etc/crontab or in files in /etc/cron.d for system cron job definitions, and /var/spool/cron for cron job definitions belonging to users.

Kala

Kala

NOT A: Cron jobs and anacron jobs are different. anacron has a separate deamon to run. Both are for same purpose but different jobs.

Marc

Marc

Only C for me

Jef Adams

Jef Adams

From man page anacron :

ANACRON(8) System Administration ANACRON(8)

NAME
anacron – runs commands periodically

SYNOPSIS
anacron [-s] [-f] [-n] [-d] [-q] [-t anacrontab] [-S spooldir] [job]
anacron [-S spooldir] -u [-t anacrontab] [job]
anacron [-V|-h]
anacron -T [-t anacrontab]

DESCRIPTION
Anacron is used to execute commands periodically, with a frequency specified in days.
Unlike cron(8), it does not assume that the machine is running continuously. Hence, it
can be used on machines that are not running 24 hours a day to control regular jobs as
daily, weekly, and monthly jobs.

Anacron reads a list of jobs from the /etc/anacrontab configuration file (see
anacrontab(5)). This file contains the list of jobs that Anacron controls. Each job
entry specifies a period in days, a delay in minutes, a unique job identifier, and a
shell command.

So answer A, C