TO scheduled particular Task #service gpm stop #service gpm start
Cron demon execute the schedule jobes. It
will be use 24 hours clock timing.
#crontab –e filename (in
that file we have to add contain by format) 1 2 3 4 5 min hours
day of month month of year day of week. (0-59) (0-23) (1-31) (1-12) (0-6) or or (jan-dec) (sun-sat) (First
three char is enough) (to know the cron list) #crontab –l (to
edit Cron entry ) #crontab –e (To remove cron entry) #crontab –r min hours day of month month of year day of week.
*/2 */4 * * *
(*/2
means Aftre every 2 minutes ,*/4 Every
four hours and only * means every year , every month ) #crontab –e
41 13 * * * /sbin/init6 >/dev/tty4 (in this schedule system will restart every day by 13:41 in TTY4
terminal 4) (To give user to run crontab command) #crontab –e –u (username)
There are two files , what ever user wants to run cron needs To be added in /etc/cron/allow , wise versa The users which You wants to block from running Cron needs to added
in /etc/cron.deny /etc/cron.allow /etc/cron.deny |
Linux- How to >