Recall & Review
beginner
What is cron used for on a Raspberry Pi?
Cron is a tool that runs commands or scripts automatically at scheduled times or intervals on a Raspberry Pi.
Click to reveal answer
beginner
How do you edit the cron jobs for the current user?
You use the command
crontab -e to open and edit the list of scheduled tasks for the current user.Click to reveal answer
intermediate
What does the cron time format
*/5 * * * * mean?It means the task runs every 5 minutes, every hour, every day, every month, and every weekday.
Click to reveal answer
intermediate
Why is it important to use full paths in cron jobs?
Because cron runs with a limited environment, using full paths ensures the commands and scripts run correctly without missing files or programs.
Click to reveal answer
intermediate
How can you check if your cron job ran successfully?
You can check the cron logs using
grep CRON /var/log/syslog or redirect output to a file in your cron job.Click to reveal answer
Which command opens the cron editor for the current user?
✗ Incorrect
The command
crontab -e opens the cron editor for the current user.What does the asterisk (*) symbol mean in a cron schedule?
✗ Incorrect
An asterisk (*) means the task runs for every possible value of that time field.
If you want a script to run every day at 3 AM, which cron time would you use?
✗ Incorrect
The format is minute hour day month weekday. So
0 3 * * * runs at 3:00 AM every day.Why should you use full paths in cron commands?
✗ Incorrect
Cron runs with a limited environment, so full paths ensure commands run correctly.
Where can you find logs to check if cron jobs ran successfully?
✗ Incorrect
Cron logs are usually found in
/var/log/syslog on Raspberry Pi systems.Explain how to schedule a Python script to run every hour on a Raspberry Pi using cron.
Think about the cron time format and environment paths.
You got /4 concepts.
Describe how you would troubleshoot if your scheduled data collection script does not run as expected with cron.
Look for logs and environment issues.
You got /4 concepts.