At home in the evening found that I development Board time incredibly advance a day, immediately install NTP to sync time, in order to ensure the Development Board time accurate, decided to add to the crontab, let it regularly updated time, did not think crontab-e after incredibly is I have not seen editor, Online search was found in the original Debian
The default crontab editor used by Debian systems is nano, which is inconvenient to use. How can we switch between them?
Root @ debian :~ # Update-alternatives -- config editorThere are 8 choices for the alternative editor (providing/usr/bin/editor ).Selection Path Priority Status------------------------------------------------------------0/usr/bin/joe 70 auto mo
Cron mechanism
Cron allows the system to perform a specified work at a specified time, and we can use the CRONTAB directive to manage the cron mechanism
Crontab parameters
-U: This parameter allows us to edit other people's crontab, if not add this parameter, will open their own crontab
Step 1: Change the update source to debian 6.0.
# Vi/etc/apt/sources. listDeb http://ftp.us.debian.org/debian/ squeeze mainDeb-src http://ftp.us.debian.org/debian/ squeeze main
Deb http://security.debian.org/squeeze/updates mainDeb-src http://security.debian.org/squeeze/updates main
Deb http://volatile.debian.org/debian
" means to perform every two hours. The forward slash can also be used with the asterisk, such as */10, which, if used in the minute field, means that it is executed every 10 minutes.
* * * * command
Time-sharing and Lunar Week commandThe 1th column represents minutes 1~59 per minute with * or */1The 2nd column represents the hour 1~23 (0 for 0 points)The 3rd column represents the date 1~31The 4th column represents the month 1~12The 5th list of the week 0~6 (0 for Sunday)6th column the command t
Linux crontab command details, crontab command details
Crontab is a convenient command to execute a task in a scheduled (Cyclic) manner on unix/linux systems. The linux system is controlled by the cron (crond) System Service. The Linux system has a lot of planned work, so this system service is started by default. To understand the
Crontab Scheduled Task configuration record, crontab task
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 for linux commands and crontab for linux commandsCron is a built-in service in Linux. Run the following commands to start, view, and disable the service.
Service cron start // start service cron stop // close service cron restart // restart service cron reload // reload and configure service cron status // view service status
The cron global configuration file is in the/etc directory:
Cron. d/The sy
Statement: This article reproduced from: http://www.taoyutaole.com/thread-1436-1-3.html
How to Use crontab in Linux, and how to use crontab.
As a website O M engineer, you often have to deal with crontab. You can use crontab to automatically run scheduled tasks to achieve automated O M. In my daily work, I also deep
Crontab: scheduled task execution. Crontab: scheduled task execution.
I recently came into contact with the needs of scheduled execution programs, so I learned about crontab. This article first introduces the syntax knowledge of crontab, and then makes a demo.
I. crontab syn
"Global (System) configuration file"/etc/crontabLinux main configuration files are in the ETC directory.CD/etcls cron*Vim crontabAccess to CRON.D (service)CD CRON.DUse the cat command to view the Sysstat file (the Cat command is a text output command under Linux, usually for viewing the contents of a file)Cat SysstatYou'll find that the content looks similar to what you crontab-l.When the crontab loads the
One linux Command every day-crontab and linux Command-crontab
The crontab command is used to submit and manage users' tasks that require periodic execution. Similar to scheduled tasks in windows, this service tool is installed by default after the operating system is installed, the crond process will be started automatically. The crond Process regularly checks wh
[Linux] Debian downloads, installs, and graphic interfaces, and uses multiple images to kill cats and debian to kill cats.
Linux has many versions, which are rare compared with non-professional users. Unlike Windows systems, we know a little bit about it. for lower-configuration machines, we choose Windows XP Professional SP3 to use Windows 2003 Enterprise SP2 for Asp, at a very high level, Windows 2012 and
Writing a scheduled task is like CRONTAB-E, but what's the difference between this and direct Vim/etc/crontab? Why did you finish the planning task,/etc/crontab?Method 1: Use the command crontab-e and edit the timed script directly. After this execution, the user-defined, will be written to the/var/spool/cron directory
Linux-crontab and linux-crontab
I have learned a little about crontab before, And I am familiar with it some time ago. I will record it today.
Crontab commands are common in Unix and Unix-like operating systems and are used to set periodically executed commands. This command reads commands from the standard input devic
Crontab command backup log, crontab command logCrontab command to back up logs
Question
James is a server administrator who needs to back up Forum data every day (Here we use logs to replace), back up the logs of the day and delete the previous logs. The file name after the backup is in the format of year-month-day. Alternatives. log is under/var/log.
Target
1. Add scheduled tasks for shiyanlou users2. Regu
Here are two ways to crontab.
First, use PHP to execute script in crontab
Just like calling a normal shell script in crontab (specific crontab usage), use a PHP program to invoke the PHP script.
Each hour executes myscript.php as follows:
Copy the Code code as follows:
# CRONTAB
How to use:crontab file [-u user]-replaces the current crontab with the specified files.Crontab-[-u user]-replaces the current crontab with standard input.crontab-1[user]-lists the user's current crontab.crontab-e[user]-Edit user's current crontab.crontab-d[user]-Delete the user's current crontab.Crontab-c dir-Specifies the directory for crontab.Format of the crontab
Example of a scheduled task using django-crontab, and django-crontab
Today, I plan to add a scheduled task in my Django application to regularly execute some regular check functions. So I thought that using the django-crontab plug-in can satisfy my needs, the following describes how to use this plug-in.
First, use pip to install the django-
One: 1. Planning a task is a task that performs the planned work at the agreed time, which is the surface meaning. In Linux, we often use cron servers to do this work. the cron Server can perform specific work based on the time specified in the configuration file. For example, we can contract in the configuration file every morning 4 points, the HTTPD server restart, this is a scheduled task;2.Cron is a timed execution tool under LinuxCron is a built-in service for Linux, but it does not autom
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.