This runbook provides instructions on how to create a cron job on a Linux server.

Prerequisites

  • Access to the server
  • Root or sudo privileges

Steps

  1. Open Crontab
crontab -e
  1. Add a Cron Job
# m h dom mon dow command
0 2 * * * /usr/bin/backup.sh
  1. Save and Exit
  • Save the file and exit the editor.
  1. Verify the Cron Job
crontab -l

Verification

  • Ensure the cron job is listed.
  • Check logs to verify the cron job runs at the specified time.