|
The software utility Cron is a time-based job scheduler in Unix-like computer operating systems. People who set up and maintain software environments use cron to schedule jobs (commands or shell scripts) to run periodically at fixed times, dates, or intervals. It typically automates system maintenance or administration—though its general-purpose nature makes it useful for things like connecting to the Internet and downloading email at regular intervals. The origin of the name ''cron'' is unclear;〔 it has been suggested that it comes from the Greek word for time, χρόνος chronos, or that it is an acronym for "Command Run On Notice" or for "Commands Run Over Night". ''cron'' is most suitable for scheduling repetitive tasks. Scheduling one-time tasks is often more easily accomplished using the associated ''at'' utility. == Overview == Cron is driven by a ''crontab'' (cron table) file, a configuration file that specifies shell commands to run periodically on a given schedule. The crontab files are stored where the lists of jobs and other instructions to the cron daemon are kept. Users can have their own individual crontab files and often there is a system wide crontab file (usually in /etc or a subdirectory of /etc ) that only system administrators can edit.Each line of a crontab file represents a job, and is composed of a CRON expression, followed by a shell command to execute. Some cron implementations, such as in the popular 4th BSD edition written by Paul Vixie and included in many Linux distributions, add a sixth field: an account username that runs the specified job (subject to user existence and permissions). This is allowed only in the system crontabs—not in others, which are each assigned to a single user to configure. The sixth field is alternatively sometimes used for ''year'' instead of an account username—the nncron daemon for Windows does this. While normally the job is executed when the time/date specification fields all match the current time and date, there is one exception: if both "day of month" (field 3) and "day of week" (field 5) are restricted (not " *"), then one or both must match the current day. 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「cron」の詳細全文を読む スポンサード リンク
|