Linux Scheduled Tasks Crontab notes and summaries (4) Crontab's log

Source: Internet
Author: User

/var/log/cron File Save Cron task execution record

CD/var/log/-L cron*

Will find a cron log change every day.

Use

Tail-f Cron

Ability to view logs for today's cron:

Use

Cat/etc/crontab

Can see

Mailto=root means that when a crontab command or task is executed, a record message is generated to the root user

View Root's Mail

[[Email protected] cron]# CD/var/spool/mail[[email protected] mail]# pwd/var/spool/  Mail[[email protected] mail]# Lsdee  Emperor  mysql  root  - Root

You can see that every command executed is sent to the user by mail,

A certain cron-related command can be seen here. The main is the log or under/var/log/cron.

Linux Scheduled Tasks Crontab notes and summaries (4) Crontab's log

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.