' [:]+ ' nr==2 {print $4} 'Ifconfig eth0 |sed–nr ' 2S#^.*DR: (. *) BC.*#\1#GP 'Ifconfig eth0 |sed–nr ' 2s# (^.*dr:|bc.*$) # #gp '1.25 I would like to display the date in the following format, please give the specific command separately.Command: Date view time2017-02-26Date +%fSaturday Output is 6Date +%w1.26 Add a scheduled task every night 12 o'clock, back up the/etc/hosts/etc/services file to the/data directoryBuild a test environmentTimed Task Service Crond command
How can I add a monthly automatic mail function to the php server? The younger brother has never done php before. recently, he suddenly encountered this problem. if the description is not good, please forgive me. the server uses LAMP, nbsp; 1. to add an automatic reminder function for this server, you can get the bills of each employee from the database at the end of each month and then send them to each employee. 2. if the administrator wants to add
command is executed every month after other constraints are met.
The short line (-) between integers specifies an integer range. For example, 1-4 means integers 1, 2, 3, and 4.
Specifies a list of values separated by commas. For example, 3, 4, 6, and 8 indicate the four specified integers.
A forward slash (/) can be used to specify the interval. Adding/after the range means that integer can be skipped in the range. For example, 0-59/2 can be used to define every two minutes in the minute field.
a/etc/crontab, so we configure this file can also use the Cron service to do something. The crontab configuration is for a user, while the edit/etc/crontab is a task for the system. The file format for this file is:Shell=/bin/bashPath=/sbin:/bin:/usr/sbin:/usr/binMailto=root//If an error occurs, or if there is data output, the data is sent to this account as an
The cron service does not only have to read all the files in the/var/spool/cron every minute, but also read the/etc/crontab, so we can configure the file to do something with the cron service. The crontab configuration is for a user, and editing/etc/crontab is a task for the system. The file format for this file is:
Shell=/bin/bash
Path=/sbin:/bin:/usr/sbin:/usr
a/etc/crontab, so we configure this file can also use the Cron service to do something. The crontab configuration is for a user, while the edit/etc/crontab is a task for the system. The file format for this file is:Shell=/bin/bashPath=/sbin:/bin:/usr/sbin:/usr/binMailto=root//If an error occurs, or if there is data output, the data is sent to this account as an
the file is modified.
3. Edit the/etc/crontab configuration fileThe cron system level configuration file is located in/etc/crontab.
The cron service reads not only all files in/var/spool/cron every minute, but also the/etc/crontab configuration file once, therefore, we can use the cron service to configure this file. The configuration with
Time Formatcrontab format 1th column minute 1~59 2nd Column hour 1~23 (0 means midnight) 3rd Liege 1~31 4th Column Month 1~12 5th Column Week 0~6 (0 = Sunday) 6th column to run the command below is the format of crontab: Time-sharing day and month Commands to run here are some examples of crontab file entries: * * * * * * * * * * * * * * * * * * * * * * * * * * */usr/local/apache/bin/apachectl Restart abov
crontab file created by the user, each line represents a task, each field of each row represents a setting, its format is divided into six fields, the first five is the time setting segment, and the sixth paragraph is the command segment to execute, in the following format: Minute hour day Month Week commandwhichMinute: Represents minutes, which can be any integer from 0 to 59.Hour: Represents the hour, which can be any integer from 0 to 23.Day: R
Compile a crontab scheduler task in the CentOS Environment
During host management, we often do some things every day. To avoid manual operations every time, we can write scheduled tasks to automatically execute the host periodically according to the schedule.
Install and startUnder CentOS:
Yum install vixie-cronYum install crontabsThe former is usually installed on the latter.Start the service.
Service crond startYou must start the service.
System-lev
Now, a set of their own housing is one of the goals, and to young people say, buy a house almost all have to loan, the monthly supply is the most concerned about the matter, the monthly how to calculate? For how much? Which method of credit is the most affordable? Some of these problems may not be clear, the following is the use of WPS2010 form to calculate the monthly
In AIX and Linux, crontab introduces similar crontab usage in AIX and Linux. First, it introduces Crontab usage in Linux, and then introduces differences between AIX and Linux. 1. Crontab the crontab command is used to schedule the execution of some commands at a certain int
variable. If the MAILTO variable is defined as an empty string (mailto= ""), the e-mail message is not sent. The home variable can be used to set the base directory when executing a command or script. Each line of the task in the file/etc/crontab is described in the following format: minute hour day month DayOfWeek command minute -integers from 0 to 59hour -integers from 0 to 23 Day-an integer from 1 to 31 (must be a valid date for the specified mo
an asterisk, the command action is executed monthly after the constraints of other fields are met.
Comma (,): You can specify a list range with a comma-separated value, for example, "1,2,5,7,8,9"
Middle Bar (-): An integer range can be represented by a middle bar between integers, such as "2-6" for "2,3,4,5,6"
Forward slash (/): You can specify the interval frequency of the time with a forward slash, such as "0-23/2", which is performed e
, add crontab scheduled to perform tasks Crontab-eThe crontab Task command may be entered differently because of the crontab default editor.As shown in the Nano editor, the use of simple, directly at the end of the file by the crontab command format input can, ctrl+x exit, a
/bin/backup.shThe monthly 1,20,22 number 4:45 executes the/apps/bin directory under the backup.sh
1 * * 6,0/bin/find-name "core" rm {}/;Every Saturday. Day 1:10 Run a Find command
0,30 18-23 * * * */apps/bin/dbcheck.shEvery day in 18:00~23:00 every 30 minutes to execute the/apps/bin directory dbcheck.sh
0 * * 6/apps/bin/qtrend.sh23:00 Executive/apps/bin/qtrend.sh per Saturday
Command options for 3.1.3 crontab
week, which can be any integer from 0 to 7, where 0 or 7 represents Sunday.Command: The commands to execute can be either system commands or script files that you write yourself.in each of these fields, you can also use the following special characters: Asterisk (*): represents all possible values, such as the month field if it is an asterisk, the command action is executed monthly after the constraints of other fields are met. Comma (,): You can spe
Now, a set of their own housing is one of the goals, and to young people say, buy a house almost all have to loan, the monthly supply is the most concerned about the matter, the monthly how to calculate? For how much? Which method of credit is the most affordable? Some of these problems may not be clear to anyone, The following is the use of WPS2010 form to calculate the
* * Root run-parts/etc/cron.monthly//monthly to execute/etc/cron.monthly script
Attention to the "run-parts" This parameter, if you remove this parameter, then you can write a script to run the name, not the folder name.
--------------------------------------
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
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.