Scheduling tasks in a Linux system can start tasks on a regular basis. To create a scheduled task, you must first open the crontab service. This article will introduce how the Linux system uses crontab to create scheduled tasks.
crontab to start the service in linux:
/etc/init.d/crond start
crontab command format
crontab -l Display the current crontab file (the default crontab file will be saved in (/var/spool/cron/username for example: /var/spool/cron/roger)
crontab -r delete the current crontab (cautious Use this method because all scheduled tasks will be deleted.
crontab -e Edit the current crontab file using the editor
File format for crontab:
minutes Hour day-of-month month-of-year day-of-week commands
For example:
0 4 * * 2,5 /usr/bin/wall"/etc/motd< Br>
************* Explanation: The information in /etc/motd is broadcast on Tuesdays and Fridays every week*************** *********************************
*/2 12-14 * 3-6, 9-12 1-5 bash_scripts
******************* Explanation: Every year from March to June, and from Monday to Sunday in September and December At 12-14 pm, perform one every two minutes. Scripts *****
The configuration file for crontab is placed in /etc/crontab
The above is the method for creating a scheduled task for the Linux system crontab, if it appears during the execution of the scheduled task. The shell script error, you can refer to: Linux system timing task when the shell script stops executing how to solve.
Have you encountered such a situation, the server is running normally, the number of users accessing
We all know that the command to find files under Linux is the find command. With this command, you c
DNSenum is a domain name information collection tool. When used under Fedora 18, there is an ip garb
Sometimes important files are stored on your computer, and users dont want them to
How to use the tcpdump command in the Linux system
Linux system rescue mode operation example
How to undo operations in Git in Linux
Introduction to the syntax of the bzip2 command in Linux system
How does Linux copy files to other users?
How to use the Linux more command?
How Linux systems communicate remotely with Windows
How to modify the file time of the Linux system
Linux mydumper error libmysqlclient_16 not defined how to do?
What should I do if the Ubuntu login screen resolution is too high?
How to open the memory lock page when Windows 10 needs to open AWE
Win2K/XP under the circumstance of forced shutdown
Samsung notebook Win7 unexpected blue screen appears 0x0000000A code response measures
How to hide the Windows 7 desktop recycle bin icon
Five steps to perfect the Windows system
Win10 system PIN code can not be used normally
Modify Linux MAC address in VMware virtual machine
Windows Mode 7 XP Mode Download, Installation, Setup Raiders