# Day 6/100 of DevOps

### Task: 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.

Here, there are 3 applications. We need to make changes in all of these.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1762352955816/e246f30e-8c38-472c-843b-3c244f29bbd2.png?auto=compress,format&format=webp align="left")

### Steps:

1. Connect to the target server (App Server)
    
    `ssh tony@stapp03`
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1762352281726/fc300986-5b32-43e3-97ea-caf8174bb069.png?auto=compress,format&format=webp align="left")

2. Switch to the root user for administrative privileges:
    
    `sudo su -` or `sudo -i`
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1762352427304/12dd92a0-db77-4dde-824d-91ae8e618f84.png?auto=compress,format&format=webp align="left")

3. Install the cronie package (cron implementation)
    
    `yum install cronie -y`
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1762776588913/6f3ce15c-ce92-47e9-bf0a-16aac480d3ab.png align="center")

4. Start the **Crond** service and check the status
    
    `systemctl start crond`
    
    `systemctl status crond`
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1762776692944/9d608d4c-c97e-47f6-9a15-75df37cb2c87.png align="center")

6. Open the root user's crontab for editing
    
    `sudo crontab -e`
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1762777134707/6ed3d5c2-956f-4fe3-b953-54cd0c23b6d7.png align="center")

7. Add the following line to the file
    
    `/5 * echo hello > /tmp/cron_text`
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1762777187026/aeb80bfd-dedc-406b-904c-fdd7377051d1.png align="center")

`*/5`: This specifies that the command should run every five minutes.

`* * *`: These asterisks represent the hour, day of the month, month, and day of the week, respectively, indicating that the job should run regardless of these values.

`echo hello > /tmp/cron_text`: This is the command to be executed, which writes "hello" into the file

`/tmp/cron_text`, overwriting its content each time.

Once Added, resrat the Crond service

`systemctl restart crond`

8. Verify the changes
    
    After 5 minutes, I confirmed it worked by checking with:
    
    `cat /tmp/cron_text`
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1762777587249/237eba7f-0059-4268-82ce-cfeb4579ef1e.png align="center")
