欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 运维知识 > linux >内容正文

linux

linux crontab结束,linux – Crontab:有开始和结束时间的日志吗?

发布时间:2023/12/31 linux 48 豆豆
生活随笔 收集整理的这篇文章主要介绍了 linux crontab结束,linux – Crontab:有开始和结束时间的日志吗? 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

男子cron

你应该看到类似的东西

-L loglevel

Sets the loglevel for cron. The standard logging level (1) will

log the start of all the cron jobs. A higher loglevel (2) will

cause cron to log also the end of all cronjobs, which can be

useful to audit the behaviour of tasks run by cron. Logging

will be disabled if the loglevel is set to zero (0).

要使用该选项,您可以查看/ etc / default / cron

至少在Debian中它有这样的评论:

# Extra options for cron, see cron(8)

# For example, set a higher log level to audit cron's work

# EXTRA_OPTS="-L 2"

在更改配置文件后,您需要重新启动Cron:

/etc/init.d/cron restart

总结

以上是生活随笔为你收集整理的linux crontab结束,linux – Crontab:有开始和结束时间的日志吗?的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。