Crontab:有开始和结束时间的日志吗?

我的Linux服务器上有很多crontask用于我们的应用程序。 但是我没有find任何方式来知道任务何时结束,以及运行了多长时间。 我必须添加一个像时间这样的软命令来logging这个吗? 有没有办法configurationcron来做到这一点? 我有一个脚本在/ etc / cron.daily,这需要太多的时间,但我不能找出哪一个!

问候,
塞德里克

man 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

至less在Debian中有这样的评论:

 # Extra options for cron, see cron(8) # For example, set a higher log level to audit cron's work # EXTRA_OPTS="-L 2" 

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

 /etc/init.d/cron restart