Timed job outputs logs to a specified file

Source: Internet
Author: User
Scheduled job outputs logs to the specified file 0*6 *** wwwconsolephp & gt; wwwfileStatus $ (date + % Y-% m-% dT % H % M % S) logcrontab-l view jobcrontab-e edit job time-sharing, daily, monthly, and weekly commands. column 1st indicates minute 1 ~ 59. each scheduled job outputs logs to the specified file 0 */6 */www/console. php>/www/fileStatus. $ (date + % Y-% m-% dT % H. % M. % S ). log crontab-l view job crontab-e edit job minute hour day month week command column 1st represents Minute 1 ~ 59 every minute, use * or */1 to indicate 2nd columns to indicate hour 1 ~ 23 (0 indicates 0 points) column 3rd indicates date 1 ~ 31 column 4th indicates the month 1 ~ 12 column ID No. 0 ~ 6 (0 indicates Sunday) column 6th description of the command redirection operator to be run> write the command output to a file or device (such as a printer), rather than in a command prompt window or handle. <Read command input from the file rather than from the keyboard or handle.> Add the command output to the end of the file without deleting the information in the file.> & Write the output of one handle to the input of another handle. <& Read the input from one handle and write it into another handle output. | Read the output from one command and write it into the input of another command. PS is the most commonly used and very powerful process in LINUX. run the following command to check whether the php process exists. the command options in ps-ef | grep php are described as follows:-e displays all processes. -F full format. Ps aux | grep phpps aux output format: user pid % CPU % mem vsz rss tty stat start time command format description: USER: Travel owner PID: pid % CPU: CPU usage % MEM: memory usage VSZ: virtual memory occupied RSS: memory occupied TTY: terminal secondary device number (minor device number of tty) STAT: the linux process has five statuses: D cannot be interrupted. uninterruptible sleep (usually IO) R runs runnable (on run queue) S interrupt sleepingT stop traced or stoppedZ dead a defunct ("zombie") process Note: Other states also include W (no resident page), <(high-priority process ), N (low-priority process), L (memory lock page ). START: start time of the trip TIME: execution time command: executed COMMAND
Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.