In the O & M industry, there is a popular saying that it can be automatically completed without manual operations. This involves setting crond for scheduled tasks in Linux. The following describes how to set crond.
Method 1: edit/etc/crontab
SHELL =/
Need to write a regular update system under Linux script, man Crondtab is not very detailed, now the network is listed as follows:Crontab is a handy program that performs a task periodically (looping) on a unix/linux system using the cron service,
1) Add a scheduled taskCRONTAB-E will use an editor to open a file, and then enter the scheduled tasks to be performed, after saving, under/var/spool/cron/crontabs/, a file named after the user name will appear.2) How to add a scheduled taskEach row
System Scheduled Tasks
Most of the system administration work is done by automating a script on a regular basis, so you can automate your operations by executing a script on a regular basis, using the Cron functionality of Linux.
D. Generally, it indicates the service at the end.
Crond is usually used in many cases.
Open/etc and find the files and folders starting with cron.
Root @ iwissen:/etc # ls-LD cron * drwxr-XR-x 2 root Root 4096 Feb 7 18:03 cron. ddrwxr-XR-x
CentOS7 crontab is not executed. Error/bin/sh: root: command not found, centos7crontab
When you use CentOS7 to execute the scheduled script, an error is returned:
/bin/sh: root: command not found
The problem is that the file/var/spool/cron/root
Usage Description Service commands are used to manage system services such as Start, Stop (stop), restart (restart), view status, and so on.The related commands also include chkconfig, NTSYSV, etc., chkconfig to view, set the runlevel of the service,
The Apache SVN server configured yesterday cannot be opened this morning. I checked the server and opened it. Therefore, log on to the system and use service httpd stop. failed!The service is not automatically started. Service httpd start, started
Purpose Description
Service commands are used to manage system services, such as Startup (start), Stop (stop), restart (restart), view status (status), and so on. Related commands also include chkconfig, NTSYSV, etc., chkconfig for viewing, setting
Brief introduction
The crontab command is common in UNIX and unix-based operating systems, and is used to set periodically executed instructions. This command reads the instruction from the standard input device and stores it in a "crontab" file
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.