Create a Cron Job -Error

Hi,
I am pretty sure I’ve added in the crontab, look the command I run in each server:

yum install cronie -y && service crond start && echo ‘*/5 * * * * root echo hello’ >> /etc/crontab && service crond restart

I’ve checked on each before pressing submit.

Thanks and BR,
Eduardo

Hello,

In question it is asked to add cron specifically for user root, however /etc/crontab file is used to add system wide crons. The validation is looking for cron in root user’s crontab itself. Just modified the question a bit to make it more clear :slight_smile:.

Thanks
Inderpreet

Hi Inderpreet,
how to confirm whether the cron service is running for user?


does this mean cron service is started for steve?
thanks,
Swaroop

Check out these links. https://www.tecmint.com/create-and-manage-cron-jobs-on-linux/
https://www.cyberciti.biz/faq/howto-linux-unix-start-restart-cron/

Hi Swaroop,

As you can see in the screenshot the status is Active: inactive (dead) which means service is stopped right now. You need to start it as asked in the question.

Thanks
Inderpreet