CRON TAB SCHEDULING COMMAND IN LINUX:
What is cron tab:
It’s a unix utility that allows task to be automatically run at desired intervals regularly or as given command in the background in word,scheduling task are calls in unix as cron job or cron task.
It’s a great feature of unix which helps to automate task. Its commonly used to automate system maintenance like scanning or backing up or regular mail downoading etc.
CRON JOB PARAMETERS:
Minute (hold values between 0-59)
Hour ( hold values between 0-23)
Day of month ( hold values between 1-31)
Month of the year ( hold values between 1-12 or jan-dec, you can use first three letters of each month’s name ,i.e. jan,feb,mar)
Day of week (hold values between 0-6 0r sun-sat, Here also you can use first three letters of each day’s name , i.e. sun ,mon)
CRON JOB EXAMPLES/COMMANDS:
1. crontab-l= To display the list of current cron job for current user.
2. crontab-e =TO EDIT a crontab entry command. With the edit command will open the schedule job i VIM editor and do necessary changes and quit.
3. crontab -u tecmint -l =TO LIST acron job of a particular user called TECMINT, it can be using by -u(user)and -l (list)
4. crontab -r = TO REMOVE a crontab use the following command. This will remove complete schedule jobs without comfirmation.
5. crontrab -i-r= TO REMOVE a crontab use -i command before deleting crontab. -i will prompt user before deleting users crontab.
SPECIAL CHARACTERS USE IN CRONTAB:
> Special character can be use to set different types of conditions to cron job.
1. ASTERISK(*)= Match all values in the field or any possible value.
2. HYPHEN(-) = To define range .
3. SLASH (/)= 1st field /10 means, every ten minute or increment of range
4. COMMA (,) = To seperate items.