← Quiz: Bash Scripting for DevOps: all 10 questions
Quiz: Bash Scripting for DevOps · Question 10 of 10
A cron job works when you run it by hand but does nothing from cron. What is a likely cause?
A cron job works when you run it by hand but does nothing from cron. What is a likely cause?
- A.cron cannot run bash scripts
- B.The script has a shebang line
- C.The machine has too much RAM
- D.cron uses a very small PATH, so commands without full paths are not found, and the error was not logged
Answer & explanation
Correct answer: cron uses a very small PATH, so commands without full paths are not found, and the error was not logged
Use full paths and redirect output with >> file.log 2>&1 to see what went wrong.
Can you get the rest right without peeking?
Take the timed Quiz: Bash Scripting for DevOps quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →