Linux timed tasks are: cron, Anacron, at, and most of the cron tasks are used
noun explanation
cron--service name; a daemon that performs a periodic task or waits for some event to be processed under Crond--linux, similar to a scheduled task under Windows; crontab--is a custom scheduled task table
Package Installation
To use the Cron service, install the Vixie-cron package and the Crontabs package first, and the two packages function as follows:
The Vixie-cron package is the main program for Cron. The Crontabs package is a program used to install, uninstall, or list tables used to drive the cron daemon.
To see if a cron package is installed: Rpm-qa|grep Vixie-cron
To see if the Crontabs package is installed: Rpm-qa|grep crontabs
If not, execute the following command to install the package (package must exist)
RPM-IVH vixie-cron-4.1-54.fc5*
RPM-IVH crontabs*
If you do not have a local installation package, you can install it online if you have a network connection
Yum Install Vixie-cron
Yum Install Crontabs
See if the Crond service is running
Pgrep Crond or/sbin/service crond status or ps-elf|grep crond|grep-v "grep"
crond Service Operations Command
/sbin/service Crond Start//Startup service
/sbin/service Crond stop//Shut down service
/sbin/service crond Restart//Restart service
/sbin/service Crond Reload//Reload Configuration
Configure Scheduled Tasks
Cron has two configuration files, one is a global profile (/etc/crontab), is for system tasks, and a set of configuration files generated by the crontab command (Files under/var/spool/cron), is for a user. Scheduled tasks can be configured to any one of them.
To view the global configuration profile configuration: Cat/etc/crontab
---------------------------------------------
Shell=/bin/bash
Path=/sbin:/bin:/usr/sbin:/usr/bin
Mailto=root
home=/
# Run-parts
* * * * * Root run-parts/etc/cron.hourly
4 * * * Root run-parts/etc/cron.daily
4 * * 0 root run-parts/etc/cron.weekly
4 1 * * Root run-parts/etc/cron.monthly
----------------------------------------------
To view scheduled tasks under a user: Crontab-l or cat/var/spool/cron/user name
crontab Task Configuration basic format
Linux timed Task cron configuration