a/etc/crontab, so we configure this file can also use the Cron service to do something. The crontab configuration is for a user, while the edit/etc/crontab is a task for the system. The file format for this file is:Shell=/bin/bashPath=/sbin:/bin:/usr/sbin:/usr/binMailto=root//If an error occurs, or if there is data output, the data is sent to this account as an emailhome=///user-run path, here is the root directory# Run-parts* * * * * root run-parts/
Linux Account Password Expiration will cause the crontab job to fail to be executed, linuxcrontab
Today, a colleague reported that the crontab job on the Linux server was not running. After checking the/var/log/cron log, the following error message was found:
Jan 19 16:30:0
resource is more idle;Crontab: Recurring Task ScheduleDaemon: CrondThere are two types of recurring tasks:(1) System cron task; There is no default running user identity, so you need to specify the additional runner;/etc/crontabVim command# Example of Job definition:#.----------------Minute (0-59)# | .-------------Hour (0-23)# | | .----------Day of Month (1-31)# | | | .-------month (1-12) OR jan,feb,mar,ap
Create a cron service for the current user
1. Type CRONTAB-E edit crontab service file
For example, the contents of the file are as follows:
*/2 * * * */bin/sh/home/admin/jiaoben/buy/deletefile.sh
Save File and exit
*/2 * * * */bin/sh/home/admin/jiaoben/buy/deletefile.sh
*/2 * * * * Through this field you can set when to execute the script
/bin/sh/home/admin/jiaoben/buy/deletefile.sh This field can set the script you want to execute, here to note that
a/etc/crontab, so we configure this file can also use the Cron service to do something. The crontab configuration is for a user, while the edit/etc/crontab is a task for the system. The file format for this file is:Shell=/bin/bashPath=/sbin:/bin:/usr/sbin:/usr/binMailto=root//If an error occurs, or if there is data output, the data is sent to this account as an emailhome=///user-run path, here is the root directory# Run-parts* * * * * root run-parts/
parameter):$ mkdir tardir$ tar -xf shiyanlou.tar -C tardirTo view only the unresolved package file-T parameter:$ tar -tf shiyanlou.tarKeep file attributes and follow links (symbolic links or soft links), sometimes we use tar to back up files when you restore to other hosts you want to keep the properties of the file (-p parameter) and the source file that the backup link points to instead of the link itself (-H parameter):$ tar -cphf etc.tar /etcWe just need to add the-Z parameter to the build
1. Run the program automatically at power-on startup
After Linux is loaded, it initializes hardware and device drivers, and then runs the first process init. Init continues the boot process based on the configuration file to start another process. Typically, modifications are placed in/ETC/RC or/etc/rc.d or/ETC/RC? The script file in the D directory allows Init to start other programs automatically. For example: Edit/etc/rc.d/rc.local file, at the bo
; Client_body_buffer_size 512k; Location / {port_in_redirect on; Proxy_pass http: // localhost:8080; proxy_redirect off; Proxy_set_header Host $host; Proxy_set_header X -real-ip $remote _addr; Proxy_set_header X -forwarded-for $proxy _add_x_forwarded_for; }} C. sudo vi/etc/hosts Join 127.0.0.1 jenkins.jobstreet.comAdd to host file if you are accessing other machines.Jenkins set up Linux nodesJenkins
[-D printer Queue] [-n print copies] file E g:lp-d hp_p2015-n 2/etc/issue 8, lpq : View of print job lpq [-al] [-P print queue] -A: List all printers working in queue 9 , lprm : Delete the print job LPRM [-P print queue] job ID second, hardware inspection1,lspci: List the PCI interface device of PC system LSPCI [-VVN]-V: Show details of devices with multipl
Linux system setup and basic Operation ? Use the Preferences settings and system management tools in the GNOME desktop suite to perform the following tasks A. set a static IP address for the first NIC and be able to communicate with other hosts in the same network segment Steps: 1. Click "System" → "Manage" → "network" To open the "Network Configuration" window. : 650) this.width=650; "Style=" background-im
the normal synchronization to the NTP Serveruse a different computer (need to install ntpdate) , perform ntpdate NTP Server AddressEg:ntpdate 192.168.1.94If you have a similar output like this:17:33:39 ntpdate[29134]: Step time server 192.168.1.94 offset 3.174187 secIndicates a successful synchronization.Fifth step, configure time synchronization clientVi/var/spool/cron/root (or CRONTAB-E)Add a row to synchronize with the time synchronization server
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.