A Crontab - Schedule Service in Linux
Crontab is a scheduling utility that is perform to specific tasks on specific time. In linux, you can schedule a particular service on specific time or date.
Why we require it?
To access it automatically, user can't require to run it.
Here we can see some example to use crontab in ubuntu flavour:
First of all crontab service is handling by service name "crond".
You can simply check weather service is running or not?
Example:
# service crond start
Press enter to proceed
How to edit the crontab file?
Open the terminal. Apply the following command:
#crontab -e
where "e" switch for edit the crontab scheduling file.
In crontab file, it is required to fill some information these are:
1. Start Minute
2. Hours
3. Date
4. Month
5. Days of Week
6. Application Path Which Task You Want To Run
For instance, if you want to open the bash shell automatically. You can simply fill all the detail by mention bash shell path like this:
Enter all the details and save the crontab file.
To start the crontab daemon
# service crond start
Press enter to proceed.
To run crontab service at booting time you need to apply the following command:
# chkconfig crond on
Press enter to proceed.
To list the all crontab scheduling entries in the system:
# crontab -l
Press enter to proceed.
To Remove the crontab list of entries:
# crontab -r
Press enter to proceed.
In this blog, crontab service exist in operating system is discussed. It is unique and very beneficial service available in operating system. In this blog, we understand the basic concept of crontab file and how we can run or manage the service easily. You do not require configure too many command in it. Automatically, running processes is easy task for the crontab service. Best in use and advantage if you plan your specific task on particular time. If you need more information, please send us query.
No comments