Basic format:
* * * * command
Time-sharing and Lunar Week command
The 1th column represents minutes 1~59 per minute with * or */1
The 2nd column represents the hour 1~23 (0 for 0 points)
The 3rd column represents the date 1~31
The 4th column represents the month 1~12
The 5th list of the week 0~6 (0 for Sunday)
6th column the command to run
Some examples of crontab files:
* * * */usr/local/etc/rc.d/lighttpd restart
The above example represents 21:30 re
Failure to execute a shell script through a timed task in CentOS failed with the following shell script, which was not written according to Spec:
1) The execution of the shell script (Sh backup.sh) was executed successfully, excluding the syntax error of the SH script.2 through the Nano/etc/crontab command to view the timing of the task, found that in addition to the timing of the task of SH, other tasks can be carried out normally. Check its code,
Server System: 64Bit CentOS 5.5
Although the introduction of Crontab is everywhere, read the term in detail, the harvest is still available. Crontab This name comes from "Chronos", an ancient Greek, "time" meaning (the following usage in the production environment of the server is very useful, fuqin cooking wine strongly recommended); The basic usage and syntax of Cron
Crontab format and detailed example format: *** command indicates that the 1st column of the day-month-week command indicates minute 1 ~ 59 every minute, use * or */1 to indicate 2nd columns to indicate hour 1 ~ 23 (0 indicates 0 points) column 3rd indicates date 1 ~ 31 column 4th indicates the month 1 ~ 12 5th columns... crontab format and Example format: ***** command minute by day month week command 1st
First, preface
Today, simply record the configuration of the crontab
Ii. Catalogue of Crontab
/etc/crontab file This is the scheduled task for the system to run/var/spool/cron directory user-defined crontab tasks are placed in this directory ls–lrt/etc/cron* /etc/cron.deny Rep
Format:* *** CommandHour, day, month, and week commands
The 1st column indicates minute 1 ~ 59. Each minute is represented by * or */1.The first column indicates the hour 1 ~ 23 (0 indicates 0 points)The 3rd column indicates the date 1 ~ 31The 4th column indicates the month 1 ~ 12The Identification Number of column 5th is from day of the week to day ~ 6 (0 indicates Sunday)6th columns of commands to run
Some examples of crontab files:
30 21 ***/
Crontab Scheduled Task configuration record
First, preface
Today, simply record the configuration of the crontab
Ii. Catalogue of Crontab
/etc/crontab file This is the scheduled task for the system to run/var/spool/cron directory user-defined crontab tasks are placed
Tags:/etc/strong home lan pre mac grep Linux editDescription1, Linux and Mac operating crontab are consistent2, the configuration files are under/etc/crontab, if not created.3. The test finds that the scheduled task created directly with the CRONTAB-E command is placed in the Temp folder, and the restart is deleted and is not associated with the/etc/
Boyun was published on 1. Log On with the root permission
2. crontab-u lsbi-e
3. Add the command to be started, such as 40 4 18 **/oracle_backup/bin/scott_select.sh
4. Restart service crond restart
5. OK
Note:
1. The program to run in cmd is sent to SH for execution. This shell only contains three environment variables: User, home, and shell.
2. Set each fraction to the */5 *** cmd command.
The following is an example file:# Min hour day month dayofw
1. Introduction to the crontab Environment1. cron service in/etc/init. d/cron2. run the/usr/sbin/cron3. cron configuration file in/etc/cron. dfile list :. PROTO, FIFO,. deny, cron. allow, cron. deny, queuedefs4. cron connection file/usr/lib/cron/-> .. /.. /etc/cron. d5. the user's crontab file is located in the/usr/spool/cron/crontabs directory and named after the user name.
2. Start and Stop the
The crontab command is used to submit and manage tasks that the user needs to perform periodically, similar to the Scheduled tasks under Windows.(1) Usage:Usage: crontab [-u user] Filecrontab [-u user] [-e |-l |-r](2) Function:Features: when the operating system is installed, the Service tool is installed by default, and the Crond process is automatically started, and the Crond process periodically checks t
Objective:We know that at command is a user directly given a point in time to perform a specific task, for some of the daily needs to execute the command, we can not go every day to execute once, so, Linux provides a loop run routine work command "crontab", it is by cron (Crond) This system service to control, it OPS personnel by configuring the Crontab configuration file to realize the loop operation, curr
using crontab to implement timed backup of Oracle databaseXu Yuze
01-4-29 09:53:52
Timed hot Backup (EXP) for an Oracle database can usually be implemented in two ways, using the Task Queue Manager (Job queue) that it provides in an Oracle database, and using the operating system's timed execution commands to do so. In the first method, the database is required to start the background process SNP, and the task queue
Do a Linux timed task today (summarize the table every 12 o'clock in the evening).By the way, write a blog record ~ ~Why use Linux timed tasks instead of scheduling tasks on the project? The reason is to prevent the project from collapsing for various reasons. So I used a more stable Linux timing task (I think so (^_^)).At first I felt very simple, thought that at most half an hour to take care of,, the result from 10 points to get 12:30 only to fix (mainly my English too slag and database error
Using php to build a website, one of which can be used regularly every week. I want to see what methods I used to look at other people's things. There are generally two methods: one is a timing task provided by php and the other is carried by the system, crontab in Linux and scheduled tasks in Windows. Previously, I used the timer task work function provided by php. I found that the implementation was very simple and there were no many problems in the
Original link http://hougbin.iteye.com/blog/799335Crontab detailed cron is a daemon that can be used to schedule execution of repetitive tasks based on a combination of time, date, month, and week. Cron assumes that the system is running continuously. If the system is not running when a task is scheduled, the task will not be executed. To use the Cron service, you must have Vixie installed-cron RPM Package and must be running the Crond service.To determine if the package is installed, use the Rp
Installing the crontab service in CentOSToday, when I configured crontab on the test machine, I found that it was not installed, so I had to install one quickly.CentOS version: 5.7Procedure1. Check whether crontab is installed:Execute the crontab command. If command not found is reported, it indicates that the
Use crontab to deploy scheduled tasks in Ubuntu
Using php to build a website, one of which can be used regularly every week. I want to see what methods I used to look at other people's things. There are generally two methods: one is a timing task provided by php and the other is carried by the system, crontab in Linux and scheduled tasks in Windows.
Previously, I used the timer task work function provided b
The implementation of Linux timing tasks are: cron, Anacron, at, and so on, here mainly about cron services.Noun Explanation:Cron is the service name, Crond is a background process, and crontab is a custom-made scheduled task table.Package Installation:To use the Cron service, install the Vixie-cron package and the Crontabs package first, and the two packages function as follows:The Vixie-cron package is the main program for Cron.The Crontabs package
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.