Lab - Schedule Tasks

why is this not an accepted answer
crontab -u bob -l

0 06,23 * * 0 sudo /usr/bin/systemctl restart nginx
OR
0 6,23 * * 0 sudo /usr/bin/systemctl restart nginx

BUT this is
0 6,23 * * 0 sudo systemctl restart nginx
that is the official answer but shouldn’t either of the above work? Actually the first entry has 06 which isnt an accepted input, but the other should be fine no?

shouldn’t you use absolute paths for everything in cron?

cheers,

Hi @dark_knightuk

It’s indeed a recommended practice ( not a hard rule) to use absolute paths in scripts.
Can you please share the link to the lab you are referring to?

Regards.

Operations and deploy - Lab - Scheduled tasks