/bin/run-parts, functions to execute all scripts/programs in a directory.Run-parts/etc/cron.hourly executes all scripts/programs under directory/etc/cron.hourly/.Run-parts below is the command to runThe first line means: 65 minutes a day after the boot to check whether the cron.daily file is executed, if not executed today to execute hisThe second line means: Every 7 days after the boot 70 minutes to check whether the cron.weekly file is executed, if not executed within a week to execute hisAnd
-mm-dd-hh-mm- SS;2 * * 7/bin/cp-a/etc/fstab/backup/fstab-' date +f '12 o'clock every night, get all lines in the/proc/meminfo file that begin with S or M, append to the/statistics/meminfo.txt file, and precede the daily message with a similar =============== separator line[[email protected] ~]# mkdir-pv/statisticsmkdir:created directory '/statistics ' 0 0 * * */bin/echo-e "===========\n" >>/statistics/meminfo.txt /bin/grep "^[s| M] "/proc/meminfo >>/statistics/meminfo.txtHow to use the Task
; default management of their own;-l:list, list the tasks;-r:remove to remove all tasks;-e:edit, edit, open a default editor for the current shell session to edit the cron task table;Ctrl+d Submitting a taskExample: I write to/etc/crontab1, every Monday to Saturday 3:20 A.M., run the CP command to archive the/etc/directory, storage location is/BACKUPS/ETC-YYYY-MM-DD;3 * * 1-6 root/bin/cp-a/etc//backups/etc-' date +%f ' >/dev/null 2>12, every Sunday 2:30 A.M., run the CP command to backup the/etc
protected] ~]# CRONTAB-L20 3 * * 1-6/bin/cp/etc-rpf/backups/etc-' file\%y-\%m-\%d 'title: Every Sunday wee 2 minutes, run the CP command to backup the/etc/fstab file, storage location is /backup/ Fstab-yyyy-mm-dd-hh-mm-ss[[email protected] ~]# CRONTAB-L30 2 * * 7/bin/cp/etc/fstab/backup/fstab-' file\%y-\%m-\%d-\%h-\%m-\%s 'q : every night , get all lines starting with S or M in the/proc/meminfo file , append to /statistics/ Meminfo.txt file, and the daily message is preceded by a similar =====
notation:1. Specific time: All valid values in the range of valid values for a given point in time;0 5 3 9 *2. Wildcard Time: *, meaning "every ..." means, all valid values at a given point in time;* * * * *3. Discrete time: At a given point in time, use commas to separate;0 8,20 * * 1,3,54. Continuous time: At a given point in time, use a minus sign to separate;0 8 * 1-55. Step time: At a given point in time, use division sign to separate;*/2 * * * **/7 * * * * This method does not implement s
Minute
Minutes, the value range is (0-59)
Hour
Hours, the value range is (0-23)
Day_of_month
Date, value range is (0-31)
Month
month, the value range is (1-12), you can also use jan,feb,mar,apr ... Said
Day_of_week
Week, the value range is (0-6), of which Sunday is 0 or 7, can also be expressed in Sun,mon,tue,wed,thu,fri,sat
Command
The command to execute
Sp
Today a shell script is written, and direct execution is possible.But it's not done with a task plan.The script is as follows:#!/bin/bashtime=0504timea=05Mysqd-f-u root DTS Tangled up half a day, then changed to absolute path on it.The script is as follows:#!/bin/bashtime=0504timea=05/usr/local/mysql/bin/mysqd-f-u root DTS This article is from the "Falling Star" blog, make sure to keep this source http://xiao987334176.blog.51cto.com/2202382/1642022Shell Script Task
Label:Crontab-eNo crontab for root-using an empty oneCrontab:installing New Crontab"/tmp/crontab. Jkmaak ": 1:bad minuteErrors in crontab file, can ' t install.Want to retry the same edit?Enter Y or NWant to retry the same edit? YCrontab:installing New Crontab"/tmp/crontab. Jkmaak ": 1:bad minuteErrors in crontab file, can ' t install.Want to retry the same edit?Enter Y or NWant to retry the same edit? Enter Y or NWant to retry the same edit?Enter Y or NWant to retry the same edit? YCrontab:inst
be executed here should be a standard PL/SQL code. If Program_type is specified earlier as"stored_procedure", the action to be performed here should be a stored procedure defined in Oracle (with a Java stored procedure), if the previous specified Program_type is"executable", the command line information for the external command (with path information) should be specified here; number_of_arguments: Specifies the number of supported parameters and the default value is 0 without parameters. Each p
relevant parameters and commands/P /M /d [{+|-}][{/C for all files to execute the specified command, the command body must be in double quotation marks ("), the default is" cmd/c echo @file ". The "cmd/c del/f @path" is used above to delete the specified file. (Here the @file and @path are variables and will be explained later.) )Here are the parameters that are used in the above:@PATH: Represents the full path of the file. http://blog.csdn.net/babauyang/article/details/25742797Automatically de
Linux task scheduling is actually to let the system at some time to execute certain commands or programs, so that it makes it easier for administrators to manage their own Linux, when I first learned this method, my heart filled with endless joy, I feel Linux is too powerful.I'm going to tell you the exact order.One: Task scheduling classification1. The system works, some important work must be carried out in a cycle, such as virus scanning2. Individual users may wish to perform certain programs
http://www.ibm.com/developerworks/cn/linux/l-linux-scheduler-simulator/LinschedLinsched is a Linux scheduler emulator that resides in user space. It isolates the Linux scheduler subsystem and builds an adequate kernel environment around it,This allows the emulator to be executed within the user space. It will also build a series of application programming interfa
Task Scheduler Main program:
ATD production environment is not commonly used
Anacron production environment is not commonly used
Crond commonly used, mainly introduce this program
Crond Service (daemon name Crond, always running):Command:Crontab parametersCommon Parameters Introduction:-e Edit User Task schedule-L View user's current task schedule-u user view a user task scheduleTask Schedule
Hadoop version: cloudera hadoop cdh3u3
Procedure:
1. Copy $ hadoop_home/contrib/fairscheduler/hadoop-fairscheduler-0.20.2-cdh3u3.jar to the $ hadoop_home/lib folder.
2. Modify $ hadoop_home/CONF/mapred-site.xml configuration file
3. In $ hadoop_home/CONF/New profile fair-scheduler.xml
4. perform the preceding steps on each node of the cluster, restart the cluster, and check the running status of the scheduler at http: // namenode: 50030/
Yesterday I explained how to set scheduler parameters. Today I want to explain how to set scheduler jobs. First, let's take a look at the basic creation script:
Sys. dbms_scheduler.create_job (
Job_name => '"SYS". "REBUILD_JOB1 "',
Program_name => '"SYS". "EMP_IND_REBUILD "',
Schedule_name => '"SYS". "DAILYREBUILD "',
Job_class => '"DEFAULT_JOB_CLASS "',
Comments => 'rebuilt ',
Auto_drop => TRUE,
Enabled =>
In some cases, a scheduler is needed to handle some work, such as network processing.ProgramWhen the received data is stored in the queue, the next receiving operation can be processed as quickly as possible. the received data information is processed by the debugger, such as data analysis and data packet processing. since the scheduler is responsible for processing the work, it is best to set a rule for th
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.