The log record you see is generated by cron
, not by the commands in your crontab
. You can verify this by adding
* * * * * touch /tmp/this
cron
is started via systemd
and the unit file is /lib/systemd/system/cron.service
:
[Unit]
Description=Regular background program processing daemon
Documentation=man:cron(8)
[Service]
EnvironmentFile=-/etc/default/cron
ExecStart=/usr/sbin/cron -f $EXTRA_OPTS
IgnoreSIGPIPE=false
KillMode=process
[Install]
WantedBy=multi-user.target
From this, you see that cron
is started with the variable EXTRA_OPTS
from the environment file /etc/default/cron
as extra options.
In /etc/default/cron
, it says:
# For example, to enable LSB name support in /etc/cron.d/, use
# EXTRA_OPTS='-l'
#
# Or, to log standard messages, plus jobs with exit status != 0:
# EXTRA_OPTS='-L 5'
#
# For quick reference, the currently available log levels are:
# 0 no logging (errors are logged regardless)
# 1 log start of jobs
# 2 log end of jobs
# 4 log jobs with exit status != 0
# 8 log the process identifier of child process (in all logs)
#
#EXTRA_OPTS=""
And from man 8 cron
, you will find :
The default is to log the start of all jobs (1).
So, if you do not want that logging, you should set
EXTRA_OPTS=4
(or 0) in /etc/default/cron
.