Which crontab entry could be used to set the system time at regular intervals?

Which crontab entry could be used to set the system time at regular intervals?
A . 1 0 * * * date $d $t $24
B . 1 0 * * * ntpdate ntp1.digex.net
C . 1 0 * * * date ntp1.digex.net
D . 1 0 * * * runcron date ntp1.digex.net
E . 1 0 * * * settime $d $t $24

Answer: B

Explanation:

The crontab entry that could be used to set the system time at regular intervals is the one that uses the ntpdate command to synchronize the system clock with a Network Time Protocol (NTP) server. The ntpdate command takes one or more NTP server names or IP addresses as arguments and adjusts the system clock accordingly12. The crontab entry B specifies that the ntpdate command should be executed at the first minute of the zeroth hour (i.e., 00:01) of every day of every month of every weekday, using the NTP server ntp1.digex.net34. This will ensure that the system time is updated daily with a reliable source.

The other crontab entries are either invalid or ineffective for setting the system time at regular intervals. The date command can be used to display or set the system date and time, but it requires a specific format for the argument, not an NTP server name5. The runcron and settime commands are not standard Linux commands and their functionality is unknown. The $d, $t, and $24 variables are also undefined and meaningless in this context.

Reference: 1: Linux At, Batch, Atq, Atrm Command Help and Examples – Computer Hope 2: How to set a cron job to run at a exact time? – Stack Overflow 3: 107.2 Lesson 1 – Linux Professional Institute Certification Programs 4: How to setup a crontab to execute at specific time – Stack Overflow 5: Writing a specific format of time in a text file every minute using … – Ask Ubuntu

Latest 102-500 Dumps Valid Version with 194 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments