CompTIA Server+ (SK0-005)Server AdministrationMedium

A system administrator needs to automate the daily backup process for a critical application server. The backup script is written in Bash and needs to execute at 2:00 AM every day. Which utility should the administrator use on a Linux server to schedule this recurring task?

  1. Acron
  2. Bat
  3. Csystemd-timer
  4. DTask Scheduler
Show answer & explanation

Correct answer: A. cron

The `cron` utility is the standard and most commonly used tool on Linux systems for scheduling recurring tasks at specified intervals or times.

Why the other options are wrong

  • B. The `at` command is used for scheduling a task to run once at a specific time, not for recurring tasks.
  • C. `systemd-timer` is a more modern alternative to `cron` in systemd-based systems, but `cron` is the more universally recognized and common utility for 'Linux servers' in general scenarios.
  • D. Task Scheduler is a Windows utility, not typically used on Linux for this purpose.

cron

cron is a time-based job scheduler in Unix-like computer operating systems. Users who wish to maintain their own regularly scheduled jobs use crontab (cron table) files.

  • Used for scheduling recurring tasks
  • Jobs defined in crontab files
  • Syntax specifies minute, hour, day of month, month, day of week

Memory trick: Linux tasks: `cron` runs on time, `at` runs just once!

More Server Administration questions