Storing crontab logs in linux

Source: Internet
Author: User
For details about how to store crontab logs in linux-Linux Enterprise Application-Linux server application, see the following. By default, logs executed in crontab are written in/var/log, for example:

# Ls/var/log/cron *

/Var/log/cron/var/log/cron.1/var/log/cron.2/var/log/cron.3/var/log/cron.4

Crontab logs. When the crond task fails, an email is sent to the user. if a task is not executed normally on the server, crond fails to send emails. check the mail log to see if the disk space is insufficient.

Point the cornd error output and standard output logs to custom log files:

0 6 * ** $ HOME/fro_crontab/createTomorrowTables> $ HOME/for_crontab/mylog. log 2> & 1
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.