Linux System Administrator: Create a Cron Job in Linux Server for root User




Question :  You are asked to install cronie and create a cron  job for a linux server . Cron Job: */5 * * * * echo hello  >  /tmp/cron_text

Solution: 

N.B: You have to do this in all server stapp01,stapp02, stapp03. I have showed only for stapp03.

1. At first login as a root user : sudo su



2. Install cronie in the server : yum install cronie



3.  Start cron service: systemctl start crond.service 
     Check cron service status: systemctl status crond.service
   
     4. Create a cronjob by typing : crontab -e
    Write the cron job:  */5 * * * * echo hello  >  /tmp/cron_text
    Check cron job: crontab -l
   



5. Check cron job for root: crontab -u root -l

 

I have made a video tutorial. You can check this




Task from: KodeKloud Engineer Linux System Administrator Task 2

Download Coding Interview Book and Get More Tutorials for Coding and Interview Solution: Click Here

Download System Design Interview Book and Get More Tutorials and Interview Solution: Click Here

Do you need more Guidance or Help? Then Book 1:1 Quick Call with Me: Click Here

Share on Google Plus

About Ashadullah Shawon

I am Ashadullah Shawon. I am a Software Engineer. I studied Computer Science and Engineering (CSE) at RUET. I Like To Share Knowledge. Learn More: Click Here
    Blogger Comment
    Facebook Comment

1 comments:

  1. Be practical about the kinds of jobs you are applying for. Frequently when make a profession change into a new position market you will wind up seeking more junior level positions then you would inside your present vocation field. Free Resume Builder

    ReplyDelete