Tuesday, May 14, 2013

CRON Scheduler:


CRON Scheduler


                           /    Cron
Schedulers <
                           \    Anacron

 

CRON
  
                  Scheduler for Unix based systems, used in all Unix flavors such as IBM-AIX, HP-UX, Sun Solaris, Linux (RedHat, Suse, Mandrake, Debian etc.).

A crown is a server which came in the RAM at the time of bootup and remains there till system shutdowns. It gets activated every one minute and on activate it does three things.


1. It reads its configuration file /etc/crontab and does as per instructed.

Environmental Variables for crond
---------------------------------
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/


Time  As User Instruction Argument (Optional)
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
 
 
1st star    -> Minute (00-59)
2nd star    -> Time   (00-23)
3rd star    -> Date    (1-31)
4th star    -> Month  (1-12)
5th star    -> Day      (0-7)


2. It goes into /etc/cron.d and opens each file and does as per instruction.

3. It goes into /var/spool/cron and opens each file and does as per instruction.


ANACRON:
   Anacron is also a scheduler but only in RedHat Linux. It is an extension to
cron. Whatever jobs are left by cron is completed by anacron.

Anacron's configuration file is /etc/anacrontab


3 comments:

Post a Comment