nerdexam
Linux_Foundation

LFCS · Question #491

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

The correct answer is B. 1 0 * * * ntpdate ntp1.digex.net. This question asks for the correct crontab entry to synchronize the system time using an NTP server. The ntpdate command is specifically designed for one-time manual synchronization.

Submitted by ngozi_ng· Apr 18, 2026Operation of Running Systems

Question

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

Options

  • A1 0 * * * date $d $t $24
  • B1 0 * * * ntpdate ntp1.digex.net
  • C1 0 * * * date ntp1.digex.net
  • D1 0 * * * runcron date ntp1.digex.net
  • E1 0 * * * settime $d $t $24

How the community answered

(59 responses)
  • B
    95% (56)
  • C
    3% (2)
  • D
    2% (1)

Why each option

This question asks for the correct crontab entry to synchronize the system time using an NTP server. The `ntpdate` command is specifically designed for one-time manual synchronization.

A1 0 * * * date $d $t $24

The `date` command with `$d $t $24` is used to display or set the system date/time, but these variables are not standard for specifying date/time from an external source or directly setting the time in this format within a script.

B1 0 * * * ntpdate ntp1.digex.netCorrect

The `ntpdate` command is used to quickly set the system date and time by querying a Network Time Protocol (NTP) server, such as `ntp1.digex.net`, making it suitable for periodic time synchronization via cron. The `1 0 * * *` specifies the job to run at 00:01 daily.

C1 0 * * * date ntp1.digex.net

While `date` can set the time, it cannot synchronize with an NTP server directly using a hostname as an argument for synchronization.

D1 0 * * * runcron date ntp1.digex.net

`runcron` is not a standard command or utility for scheduling or running cron jobs; cron itself handles the execution.

E1 0 * * * settime $d $t $24

`settime` is not a standard command for setting system time in Linux; the `date` command is typically used.

Concept tested: Cron and NTP time synchronization

Source: https://linux.die.net/man/8/ntpdate

Topics

#cron#NTP#System Time#Scheduling

Community Discussion

No community discussion yet for this question.

Full LFCS Practice