• CronHowto

Contents

  1. Introduction
    1. Using Cron
    2. Crontab Sections
    3. Crontab Options
    4. Enable User Level Cron
    5. Further Considerations
    6. Troubleshooting and Common Problems
    7. Advanced Crontab
    8. GUI Applications
  2. Tips
    1. Crontab Example
    2. How Anacron is Arranged
    3. Cron Jobs Alternatives

Introduction

Cron is a system daemon used to execute desired tasks (in the background) at designated times.

A crontab is a simple text file with a list of commands meant to be run at specified times. It is edited with a command-line utility. These commands (and their run times) are then controlled by the cron daemon, which executes them in the system background. Each user has a crontab file which specifies the actions and times at which they should be executed, these jobs will run regardless of whether the user is actually logged into the system. There is also a root crontab for tasks requiring administrative privileges. This system crontab allows scheduling of systemwide tasks (such as log rotations and system database updates).

More information can be found:

 man crontab

or from the OpenGroup specifications.

An alternative in Gnome-based Ubuntu systems is to use the Gnome Scheduled tasks tool (from the gnome-schedule package) in Applications --> System Tools.

Using Cron

To use cron for tasks meant to run only for your user profile, add entries to your own user's crontab file. Start the crontab editor from a terminal window:

crontab -e
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。