In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Ubuntu how to enable Crontab logging, I believe that many inexperienced people do not know what to do, so this article summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.
After installing crontab under ubuntu, the system defaults to not enabling logging for crontab and enabling logging for crontab:
Modify the rsyslog file to delete the # before # cron.* in the / etc/rsyslog.d/50-default.conf file
Restart the rsyslog service service rsyslog restart
Restart the cron service service cron restart
The code is as follows:
More / var/log/cron.log
You can view the runtime log file, if it appears in the log file:
The code is as follows:
No MTA installed, discarding output
That is to say, when crontab executes the script, it will not output the wrong information directly, but will send it to your mailbox in the form of e-mail, which will report this error if you do not have a mail server installed. If it is a test, you can solve it in the following ways:
Add the following to each timed script:
The code is as follows:
> / dev/null 2 > & 1
The problem of No MTA installed and discarding output can be solved.
After reading the above, have you mastered how to enable Crontab logging in Ubuntu? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.