0
0
Linux CLIscripting~5 mins

Common cron expressions in Linux CLI - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does the cron expression 0 0 * * * mean?
It means the task runs every day at midnight (00:00). The fields represent: minute=0, hour=0, every day, every month, every weekday.
Click to reveal answer
beginner
Explain the cron expression */15 * * * *.
This runs a task every 15 minutes. The */15 in the minute field means 'every 15 minutes', while the other fields mean every hour, day, month, and weekday.
Click to reveal answer
intermediate
What does 0 9 * * 1-5 schedule?
It schedules a task to run at 9:00 AM every weekday (Monday to Friday). The 1-5 in the weekday field means Monday through Friday.
Click to reveal answer
intermediate
How do you schedule a cron job to run at 5:30 PM on the 1st of every month?
Use 30 17 1 * *. This means minute=30, hour=17 (5 PM), day=1, every month, every weekday.
Click to reveal answer
intermediate
What does the cron expression 0 0 1 1 * do?
It runs a task once a year at midnight on January 1st. The fields mean: minute=0, hour=0, day=1, month=1 (January), every day of the week.
Click to reveal answer
What does the cron expression 0 * * * * do?
ARuns a task every hour at the start of the hour
BRuns a task every minute
CRuns a task once a day at midnight
DRuns a task every day at noon
Which cron expression runs a task every Sunday at 3 AM?
A0 3 * * 7
BBoth A and B
C0 3 * * 1
D0 3 * * 0
How often does */10 * * * * run?
AEvery 10 hours
BEvery 10 seconds
CEvery 10 minutes
DEvery 10 days
What does the * symbol mean in a cron expression?
AEvery possible value for that field
BNo value
COnly one specific value
DA comment
Which cron expression runs a task at 11:45 PM every day?
A11 45 * * *
B23 45 * * *
C45 11 * * *
D45 23 * * *
Describe how to read a cron expression and explain what each field means.
Think of the cron expression as a schedule with five parts: minute, hour, day, month, and weekday.
You got /6 concepts.
    Explain how to schedule a task to run every weekday at 8 AM using a cron expression.
    Remember weekdays are numbers 1 to 5 in cron.
    You got /6 concepts.