Create a cron job

Hi, I completed the cron job task and its show task status failed due to crond not running on stapp02. Attached is the screenshot showing the status of crond running on stapp02. Please make the necessary adjustment to my credit or reload the test. Thanks

Hello Tosin,
I did a ssh to stapp01 server, but I am not able to get to the root of the user. It is prompting me for the root user password, I couldnt find any such root password details in the Project documentation .


Can you please suggest how you landed to the root user on stapp02 server. Your timely response would be highly appreciated.

Thanks!

To switch into root user. Try “sudo su”

This doesnt work, but anyways I found another set of commands which allowed me to create cron jobs for the root usee.

@Tosin I am also getting the a similiar message where crond is not setup pn setapp01 server. Did you receive any credit for the same task ?

You can try other steps too.
step-1 :–

  1. sudo passwd root → change password of root
  2. su - root

step-2 :–

  1. sudo -i → enter password of sudo user

You have to install and start cron service in all 3 servers. Then create the cron job. Those who are beginners can follow this tutorial: Create a Cron Job for KodeKloud Engineer

1 Like

Hello.
I think that i did right.
What i did:
ssh @
some appserver (some user) # sudo su -l root
some appserver (root) # crontab -e

*/5 * * * * echo hello > /tmp/

Check please.
P.S. I know that i could did that:
some appserver (root) # vi /etc/crontab

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

But I think the first option should work too. Or not.
Thanks.

Hi @denis

This is marked successful for you.