You are Here:
FAQ
Scripting & Programming
Cron Jobs
Article #2
|
What are cron jobs?1&1 Professional 5.0 With Linux and also with other Unix derivatives, there are very many processes that support the system administration that run in the background and are described as daemons. The most diverse of all daemons is the crond, which automatically starts predetermined commands at a certain time, like an automatic appointment calendar. The well distributed Linux crond from Paul Vixie (vixie-cron) principally allows users, with the cron tab command, a column of their own to be installed in the appointment calendar of the daemon. The entered commands in this column are, so to say, implemented with the user identification of the implementing person. In general, the cron daemon (crond) is called up and works in the background during the system initialisation from one of the rc*-files. The contact point which controls the jobs is called /etc/crontab, which is continually inquired upon by the cron daemon which allows the user of this file and personal cron tables to see in this task list if an implementation has to be fulfilled at that very instant. Easily stated, use cron by calling up the cron tab command and entering lines in a certain format, that will be recognised by cron. Ever line contains a command to be implemented as well as the time it is to be implemented. The cron tab file contains instructions for the cron daemon in the form of "start this program at this certain time on this certain date". Every user owns his own cron tab file, and the commands in this file are exclusively listed for the user who started this file. Empty spaces, indentations, and tables are ignored. Lines with a # symbol are comments and are ignored. Please be careful not to put comments in the same lines as cron commands, because they would otherwise be considered a part of the command. The comments are also not allowed to be placed on the same lines where the settings of the surrounding variables. An line in a cron tab which can be implemented is either a surrounding variable for the implementation of all commands located in this file, or a time mask with associated commands of its own. A time mask consists of 5 fields that are separated by empty spaces. The time mask:
|
© 2007 1&1 Internet Ltd - About 1&1 Internet