Cron job not found root user on stapp01

I believe I created a cronjob for all three app server for root user, but the system failed me. It only identified stapp01 and I used the same command for all three servers.
sudo yum install -y cronie
sudo systemctl start crond
crontab -e
—*/5 * * * * root echo hello > /tmp/cron_text

what is the error message. If possible could you please share the screenshot?

I have tested the lab and it is working as expected for me.

And also I have noticed that crontab -e should run with sudo to install cron for root user

crontab -e —> sudo crontab -e

Hello,

Seems like you added the cron for user tony instead of user root. Either you should have switched to user root before running crontab -e or you could use sudo.

I hope that clarifies your doubt.

Thanks
Inderpreet

1 Like

It was my first time of failing a task so I did not realize I had to take a screenshot instead I was checking through it. However, since the screenshot is the criteria to prove accuracy, I guess this will be a learning curve for me.

*/5 * * * * root echo hello > /tmp/cron_text

          • [user] command
            I assume this is the right syntax and using sudo will not alter this command or switch the user that i have specified, rather sudo should provide the root privilege, which will give a denial of permission if it is needed.

this was the error; Required cron not found for root user on stapp01
However it did not say the same for stapp02 and stapp03 and I used the same commands