The ‘Cron’ Command
The cron command starts a process that executes commands
at specified dates and times. Regularly scheduled commands can be
specified according to instructions found in the crontab
files in the directory /var/spool/cron/crontabs. Users can submit
their own crontab files via the crontab command.
The ‘Crontab’ Command
Crontab copies the specified file or standard input if no file is
specified, into a directory that holds all users’ crontabs.
SYNOPSIS:
- crontab [file]
- crontab -e [-u username]
- crontab -r [-u username]
- crontab -l [-u username]
The -e option edits a copy of the current users’
crontab file or creates an empty file to edit if crontab does not
exist.
The-r option removes a user’s crontab from the crontab
directory.
The -l options lists the crontab file for the invoking
user.
Setting up a Crontab job
A crontab file consists of lines of six fields
each.The fields are separated by spaces or tabs. The first five
are integers that specify the following:
- minute (0-59),
- hour (0-23),
- day of the month (1-31),
- month of the year (1-12),
- day of the week (0-6 with 0=Sunday).
Each of these patterns may be either an asterisk (meaning
all valid values) or a list of elements separated by commas.
An element is either a number or two numbers separated by a minus
sign ( meaning an inclusive range). Notice the time is in 24 hour
format, 0 is midnight and 13 is one in the
afternoon.

Motion is a program that monitors the video signal from one or more cameras and is able to detect if a significant part of the picture has changed; in other words, it can detect motion.
