Hello Guys in this session i am going to tell you about Cron Job.
Cron job is similar like schedule task in windows,this program give you ability to execute a command or a script with a sequence of commands, at a specified date , time or at set intervals.
Although the package is installed by default, check to make sure it is installed on your system
#rpm -qa | grep cron
if. for some reason the package not installed, you can install the same via this command
# yum install -y cronie cronie-anacron crontabs
you also need to look at the config file that
/etc/cron.denyif this file empty, all users are allow to create cron job.
Before you start using the crontab command, however, you should look at the cron field description so you better understand how to create and edit cron job.
***** command_to _execute
each star denotes Minute Hour Day_of_Month Month Day_of Week
Minute = Minute of the hour, 00 to 59. * Will indicate every minute
Hour = Hour of the day in 24-hour format, 00 to 23. * Will indicate every hour
Day = Day of the month, 1 to 31. * Will indicate every day
Month = Month of the year, 1 to 12. * Will indicate every month
Day = Day of the week, 3 chars - sun, mon, tue, or numeric (0=sun, 1=mon etc).... * Will indicate every day
Task = The command you want to execute
0 comments:
Post a Comment