Start: 2023-08-06 23:50:23
Finished: 2023-08-06 23:54:52
The Nautilus system admins team has prepared scripts to automate several day-to-day tasks. They want them to be deployed on all app servers in Stratos DC on a set schedule. Before that they need to test similar functionality with a sample cron job. Therefore, perform the steps below:
a. Install cronie package on all Nautilus app servers and start crond service. b. Add a cron */5 * * * * echo hello > /tmp/cron_text for root user.
Login to the app server 1 and switch to root. For the server credentials, check out the Project Nautilus documentation.
sshpass -p '******' ssh -o StrictHostKeyChecking=no [email protected]
sudo su -
Install cronie and start.
sudo yum install -y cronie
sudo systemctl start crond
Modify the cron file for the root.
$ sudo crontab -e
# then add this to the file
*/5 * * * * echo hello > /tmp/cron_text
To verify:
sudo crontab -l -u root
sudo systemctl status crond
Restart the service Check if a cron job is created for the root user in cron directory.
sudo systemctl restart crond
sudo ls /var/spool/cron
sudo cat /var/spool/cron/root
Repeat the same steps for app server 2 and 3.