Go UP! Enjoy these images #htmlcaption2 Stay Connected with me
blogger widgets

Friday, 8 August 2014

CRONTAB



CronTab: A perfect way to time
 messages




 The service used which is used by this application is known as crond. This application is mostly used by system administrators in various companies to give different messages to various employees when they arrive on there job. But this service could also by used by normal users. By default I have Rhel on my system. Ubuntu users can also use this . Just do the Step 3 and its done.Now I am going to illustrate you the steps using which we could setup a cronjob for ourselves :
Step 1 :
Open up your terminal.
Step 2:
By Default, crontab is present in your system. If not , then
Make sure you have a working internet connection !!!.
root@localhost: yum install crontab
Step 3:
Ubuntu users please do this step only.
After installation , please type the following lines into the terminal :
root@localhost:crontab -u ramit(user name) -e
This will open up a blank file .
Step 4:
Please type the following lines on top into this file
Minute Hour Day of the month(1-31) Month(0-12) Day of the week(0-7) Your Message
23 14 * * * /usr/bin “Hi”
Step 5 :
Save and Close the file. In the terminal type :
root@localhost: service crond restart



Step 6:
Congrats you have configured your own cronjob . Now if you want your cronjob to remain active even after you restart your pc, then type in the terminal :
root@localhost: chkconfig crond on



So, At the end of this article I believe you might have enjoyed learning the way how cronjob works. As Linux is open source knowledge is never ending. For more information you could type in the terminal man crontab.









Related Posts Plugin for WordPress, Blogger...