The scheduled task is to execute the scheduled task at the agreed time. In Linux, we use the crond service to complete the second job. The cron server can perform specific tasks according to the time specified in the configuration file. For example, we update the database every day at 4 am, which is a planned task.
Linux, there are three ways to implement scheduled tasks:
1 at Specify one time to perform one or more tasks, one time use
2 cron according to the timetable of the configuration file Automated tasks, periodic execution
3 System level mission planning and its extension anacron: Execute the scheduled task execution time as soon as possible after the defined frequency
Let's explain one by one: Br>
一:at:
#at 08:08
>echo "Hello"
>Ctrl+d(end)
The above lines indicate that Hello is output at 08:08, but it will not be processed, because the execution result will be sent to the execution user by email.
at -l or atq Query the currently scheduled task, as shown below
2 2011-05-21 01:01 a root
1 2011-05- 21 08:08 a root
The preceding number indicates the scheduled task number
at -d or atrm delete plan task
atrm 1
atrm 2
You can also delete the scheduled task by entering the /var/spoll/at directory, and the at scheduled tasks are saved in this directory.
Administrator users have access to at, normal users can use at depends on /etc/at.allow and /etc/at.deny files, both have permission to allow. Generally default to all users allowed.
Second: cron service, periodically execute a scheduled task
The cron service is provided by vixie-cron-4.1-76.e15 package, we can use rpm -qa (query all Installed package)
Linux shared memory Shared memory is a memory area reserved by the system for communication between
Today we will learn how to find and remove duplicate files on a Linux PC or server. Here is a tool
Using a Linux terminal is more than just entering commands. After learning these b
This article mainly introduces the DB2 database in the inux installation process detailed, the step
The basic concept of Linux server cluster
Active buzzer and passive buzzer difference
Mysql installation considerations, five reasons for installation failure
How to use static library and shared library on Linux platform
A detailed introduction to Debian
Basic knowledge about linux graphical interface
Linux dynamic library (.so) search path
Manually configure the IP address of linux (centos), DNS, gateway
How to install Xp system with virtual drive? (1)
Windows 7 batch file modification method
How to use the simple way to manage the retail order management
The rules and memory skills of the five-word roots
"Folder imitator" virus variant aimed at Win7 users
How to add a Bluetooth mouse device in Win8