The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 06-05-2009
robsonde robsonde is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 163
cron is your friend.

Cron from the name Chronos (the god of time)

The cron daemon is a long-running process that executes commands at specific dates and times. You can use this to schedule activities, either as one-time events or as recurring tasks


For commands that need to be executed repeatedly (e.g., hourly, daily, or weekly), you can use the crontab command.

The crontab command creates a crontab file containing commands and instructions for the cron daemon to execute. You can use the crontab command with the following options:

crontab filename installs a crontab from the file

crontab -e Edit your crontab file, or create one if it doesn't already exist.

crontab -l Display your crontab file.

A typical crontab will have system maintenance type tasks but any task can be put into cron.

Each entry in a crontab file consists of six fields, specifying in the following order:
minute(s) hour(s) day(s) month(s) weekday(s) command(s)

10 3 * * 0,4 /etc/cron.d/logchecker
10 3 * * 0 /usr/lib/newsyslog
15 3 * * 0 /usr/lib/fs/nfs/nfsfind