Service Configuration
medium

Pregunta de Service Configuration #019e3a4f

Enunciado de la Pregunta
Service Configuration
#cron
#scheduling
#job
#systemd
Medio

What can be used to create a job that will run at specified times/dates or on a repeating schedule?

A

Job

B

CalenderJob

C

BatchJob

D

CronJob

Correcto

Explicación Oficial / Explicaciones de la Comunidad

The correct answer is CronJob. In Linux, CronJob (or simply cron) is the standard mechanism for scheduling tasks to run at specific times, dates, or on a repeating schedule. The cron daemon reads configuration files (crontabs) that define jobs with precise timing syntax (minute, hour, day of month, month, day of week).

How it Works:

  • Users can create personal crontabs using crontab -e.
  • System-wide cron jobs are placed in /etc/crontab or directories like /etc/cron.d/, /etc/cron.hourly/, /etc/cron.daily/, etc.
  • The cron daemon (crond) checks these files every minute and executes matching jobs.
  • Modern systems may use systemd timers as an alternative, but cron remains the traditional and widely used scheduler.

Why other options are incorrect:

  • Job is a generic term and not a specific Linux scheduling tool. It could refer to any task or background process.
  • CalenderJob is not a standard Linux utility; it may be a misspelling or confusion with calendar-based scheduling, but no such command exists.
  • BatchJob typically refers to batch processing systems (e.g., at for one-time jobs or batch for low-load scheduling), not recurring scheduled tasks. The at command schedules one-time jobs, while batch runs jobs when system load permits, but neither handles repeating schedules like cron does.

Thus, only CronJob correctly describes the tool for recurring scheduled tasks in Linux.