CentOS 7.x Cron Issue

nservices

Verified User
Joined
Dec 11, 2008
Messages
302
Hi,
in CentOS 7.x I don't see any cron action in log, and no any cron file on log directory
HTML:
[root@server1 log]# service crond status
Redirecting to /bin/systemctl status  crond.service
* crond.service - Command Scheduler
   Loaded: loaded (/usr/lib/systemd/system/crond.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2016-04-20 12:57:23 EDT; 1h 0min ago
 Main PID: 9946 (crond)
   CGroup: /system.slice/crond.service
           `-9946 /usr/sbin/crond -n

Apr 20 12:57:23 server1.domain.co.il systemd[1]: Started Command Scheduler.
Apr 20 12:57:23 server1.domain.co.il systemd[1]: Starting Command Scheduler...
Apr 20 12:57:23 server1.domain.co.il crond[9946]: (CRON) INFO (RANDOM_DELAY will be scaled with factor 93% if used.)
Apr 20 12:57:23 server1.domain.co.il crond[9946]: (CRON) INFO (running with inotify support)
Apr 20 12:57:23 server1.domain.co.il crond[9946]: (CRON) INFO (@reboot jobs will be run at computer's startup.)

any suggestion?

Regards,
 
Hmm... check if it's actually running
Code:
ps ax |grep cron
and... check /var/log/cron which is usually where each entry shows up.
There should be a dataskq call each minute...

if not, try restarting:
Code:
systemctl restart crond
and then check /var/log/cron and /var/log/messages to see what it shows.

The DA cron tab is at:
/etc/cron.d/directadmin_cron
and should be chmod to 600, chown to root:root.

Hopefully one of these steps will show something.

John
 
reply

Hi
Code:
[root@server1 ~]# ps ax |grep cron
 9946 ?        Ss     0:00 /usr/sbin/crond -n
31469 pts/0    S+     0:00 grep --color=auto cron

did restart but it's didn't help
about the permissions, I verified it
 
Confirmed to be a VPS date bug as per this thread:
http://unix.stackexchange.com/questions/124942/rsyslog-not-logging

because of these errors:
Code:
[root@box log]# tail messages
Apr 19 01:50:54 box rsyslogd: [origin software="rsyslogd" swVersion="7.4.7" x-pid="103" x-info="http://www.rsyslog.com"] exiting on signal 15.
Apr 19 01:51:10 box rsyslogd: [origin software="rsyslogd" swVersion="7.4.7" x-pid="110" x-info="http://www.rsyslog.com"] start
Apr 19 06:19:27 box rsyslogd-3000: sd_journal_get_cursor() failed: 'Cannot assign requested address'
where the solution, was to move the file and restart things:
Code:
mv /var/lib/rsyslog/imjournal.state /var/lib/rsyslog/imjournal.state.moved
systemctl restart rsyslog
systemctl retart crond
which allowed /var/log/cron to start filling up with entries.

John
 
Back
Top