0
0
Linux CLIscripting~5 mins

Editing crontab (crontab -e) in Linux CLI - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What command do you use to edit your personal crontab file?
Use crontab -e to open and edit your personal crontab file where you can schedule tasks.
Click to reveal answer
beginner
What happens if you run crontab -e for the first time?
The system opens the default text editor (like nano or vim) to create a new crontab file if none exists.
Click to reveal answer
beginner
How do you save and exit the editor when editing crontab with nano?
Press Ctrl + O to save, then Enter to confirm, and Ctrl + X to exit nano.
Click to reveal answer
intermediate
What is the format of a crontab entry?
A crontab entry has 5 time fields (minute, hour, day of month, month, day of week) followed by the command to run.
Click to reveal answer
intermediate
Why should you be careful when editing crontab?
Because syntax errors can prevent scheduled tasks from running, and commands run automatically without prompts.
Click to reveal answer
What does the command crontab -e do?
ALists all scheduled cron jobs
BDeletes your crontab file
COpens your crontab file for editing
DRuns all cron jobs immediately
Which editor is commonly used by default when you run crontab -e on many Linux systems?
Aexcel
Bnano
Cwordpad
Dnotepad
What is the correct order of time fields in a crontab entry?
AMonth, Day of Month, Hour, Minute, Day of Week
BHour, Minute, Month, Day of Week, Day of Month
CDay of Week, Month, Day of Month, Hour, Minute
DMinute, Hour, Day of Month, Month, Day of Week
If you want a task to run every day at 3:30 AM, what would the first two fields in crontab be?
A30 3
B3 30
C0 3
D30 0
What should you do after editing and saving your crontab file?
ANothing, changes apply automatically
BRestart the computer
CRun a special command to apply changes
DDelete the crontab file
Explain how to edit your crontab file and schedule a simple task.
Think about the steps from opening to saving your scheduled task.
You got /5 concepts.
    Describe the format of a crontab entry and what each time field means.
    Remember the order and what each number controls.
    You got /6 concepts.