I was monitoring my crontab log and I saw this:
Jun 12 20:17:01 HP250G3 CRON[4798]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly) Is this normal? I've never set up any cron job for root.
Thank you for any help!
2 Answers
Yes, it's normal.
From man run-parts
NAME run-parts - run scripts or programs in a directory In your case, run-parts run all scripts in the folder /etc/cron.hourly
My /etc/cron.hourly is empty therefore /etc/cron.daily
% ls -og /etc/cron.daily total 88 -rwxr-xr-x 1 311 Dez 29 00:15 0anacron -rwxr-xr-x 1 625 Mär 9 12:55 apache2 -rwxr-xr-x 1 376 Mär 2 10:50 apport -rwxr-xr-x 1 15481 Nov 3 2014 apt -rwxr-xr-x 1 314 Feb 10 11:23 aptitude -rwxr-xr-x 1 355 Dez 10 2014 bsdmainutils -rwxr-xr-x 1 384 Okt 24 2014 cracklib-runtime -rwxr-xr-x 1 532 Mär 23 16:31 debsums -rwxr-xr-x 1 1597 Jan 17 02:10 dpkg lrwxrwxrwx 1 47 Jun 8 22:59 google-chrome-beta -> /opt/google/chrome-beta/cron/google-chrome-beta -rwxr-xr-x 1 372 Jan 22 2014 logrotate -rwxr-xr-x 1 1293 Jan 1 00:16 man-db -rwxr-xr-x 1 435 Nov 18 2014 mlocate -rwxr-xr-x 1 249 Dez 2 2014 passwd -rwxr-xr-x 1 2417 Mai 13 2013 popularity-contest -rwxr-xr-x 1 982 Nov 30 2014 rkhunter -rwxr-xr-x 1 2798 Feb 2 05:26 spamassassin -rwxr-xr-x 1 441 Okt 25 2014 sysstat -rwxr-xr-x 1 728 Mär 27 03:07 tomcat7 -rwxr-xr-x 1 214 Jan 20 10:39 update-notifier-common The script starts with the default definitions in /etc/crontab
# /etc/crontab: system-wide crontab # Unlike any other crontab you don't have to run the `crontab' # command to install the new version when you edit this file # and files in /etc/cron.d. These files also have username fields, # that none of the other crontabs do. SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # m h dom mon dow user command 17 * * * * root cd / && run-parts --report /etc/cron.hourly 25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) 47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly ) 52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly ) # Yes, this cronjob exists by default. It runs hourly and executes the scripts in /etc/ (if there are any).