Chapter 10 Periodic Processes - PowerPoint PPT Presentation

About This Presentation
Title:

Chapter 10 Periodic Processes

Description:

Cron is a daemon that periodically executes commanded ... The rtc command is run to adjust the real time clock if and when # daylight savings time changes. ... – PowerPoint PPT presentation

Number of Views:52
Avg rating:3.0/5.0
Slides: 8
Provided by: shawn1
Learn more at: https://owd.tcnj.edu
Category:

less

Transcript and Presenter's Notes

Title: Chapter 10 Periodic Processes


1
Chapter 10Periodic Processes
  • Unix System Administration

2
C-Ron, C-Ron Run
  • Cron is a daemon that periodically executes
    commanded defined in the crontab.
  • Some Unix systems provide security to restrict
    who can run cron jobs.
  • Cron jobs are executed using the Bourne shell
    (/bin/sh)

3
Put It on Crons Tab
  • Format of crontab
  • 6 space separated commands
  • field 1 minute of hour 0-59
  • field 2 hour of day 0-23
  • field 3 day of month 1-31
  • field 4 month of year 1-12
  • field 5 day of the week 1-7 (1 Sunday)
  • field 6 (to end of line) command to execute

4
/var/spool/cron/crontabs/
ident "_at_()root 1.19 98/07/06 SMI"
/ SVr4.0 1.1.3.1 / The root crontab
should be used to perform accounting data
collection. The rtc command is run to adjust
the real time clock if and when daylight
savings time changes. 10 3 0,4
/etc/cron.d/logchecker 10 3 0
/usr/lib/newsyslog 15 3 0 /usr/lib/fs/nfs/nfsf
ind 1 2 -x /usr/sbin/rtc
/usr/sbin/rtc -c /dev/null 21 30 3 -x
/usr/lib/gss/gsscred_clean
/usr/lib/gss/gsscred_clean
5
Managing Crontab
  • Edit crontabs
  • Method 1
  • setenv EDITOR vi
  • crontab -e
  • Method 2
  • crontab -l mycrontab
  • vi mycrontab
  • crontab mycrontab
  • Removing a crontab
  • crontab -r

6
Locking Down Cron
  • /etc/cron.d/cron.allow /etc/cron.d/cron.deny
  • One username per line
  • See man crontab for details on how the rules are
    enforced.

7
Questions To Ask Yourself Periodically
  • What types of services is cron well suited for?
  • What happens if the program creates output and
    you dont redirect it?
  • If /bin/sh is used to execute crontab commands,
    how do you execute stuff in other shells?
Write a Comment
User Comments (0)
About PowerShow.com