Configuration Cron and Crontab
Cron is a program that perform tasks that have been scheduled based on the table crontab. Cron complete this task by himself awake every minute and check whether there is a jobs, which must be based on the table dijalankannya crontab. Please note the difference between cron same crontab. Cron is a program or daemon, while crontab is the name to the list of jobs, which will run by cron.
Crontab = Cron Table
File command structure Crontab
* * * * * * *
The sense is, for a star to:
1. Minute (0-59)
2. Hours (0-23) 0 = dinihari
3. Day (1-31)
4. Month (1-12)
5. Weekly (0-6) 0 = Week
6. User (optional)
7. Command / Command
To create a cron schedule, live type:
crontab -e
then enter what will be the schedule
Example 1:
0 5 23 * * /sbin/reboot
This means: the computer will reboot every 23 hours at 5:00
Example 2:
5 14 1 1,5 * ping www.google.com
This means: Computer will ping each month of January and on 1 May at 14:05 hours.
It was also a problem, there is a computer that can not be ping, but I love bait in the first ping from another computer. Rather than continuously ping continue to ask, I just love the crontab every 5 minutes.
*/5 * * * * ping –c 7 10.10.1.248
This means: Computer will ping with 7 times counter to the computer with the IP 10.10.1.248 every 5 minutes.
Additional:
crontab -l : see the list of cron-job
crontab -r : remove the list of cron-job
However, CMIIW
Related Posts:
Tags: *nix, cron, crontab, Linux, schedule
15.Nov.08
Linux
You can leave a response, or trackback from your own site.