0
0
Linux CLIscripting~15 mins

Editing crontab (crontab -e) in Linux CLI - Mini Project: Build & Apply

Choose your learning style9 modes available
Editing crontab (crontab -e)
📖 Scenario: You are managing a Linux server and want to automate a simple task that runs every day at a specific time.
🎯 Goal: You will create a crontab entry that runs a command every day at 7:30 AM.
📋 What You'll Learn
Create a crontab file with a specific scheduled task
Use the correct crontab time format for 7:30 AM daily
Include a simple command like echo 'Backup started'
Save and verify the crontab entry
💡 Why This Matters
🌍 Real World
System administrators use crontab to automate routine tasks like backups, updates, and notifications.
💼 Career
Knowing how to schedule tasks with crontab is essential for Linux system administration and automation roles.
Progress0 / 4 steps
1
Create a crontab file with a scheduled task
Create a file called mycron with one line that schedules a command to run every day at 7:30 AM. The line should start with 30 7.
Linux CLI
Need a hint?

The crontab time format is minute hour day month weekday. For 7:30 AM daily, use 30 7 * * *.

2
Load the crontab file into your user crontab
Use the command crontab mycron to load the scheduled task from the mycron file into your crontab.
Linux CLI
Need a hint?

The crontab command with a filename loads that file as your crontab.

3
Verify the crontab entry
Use the command crontab -l to list your current crontab entries and confirm the scheduled task is present.
Linux CLI
Need a hint?

The crontab -l command shows your current crontab entries.

4
Show the crontab entry output
Run crontab -l and ensure the output shows the line 30 7 * * * echo 'Backup started' exactly.
Linux CLI
Need a hint?

The output should exactly match the scheduled task line you created.