Quantcast
Viewing latest article 32
Browse Latest Browse All 48

Answer by Daniel Tet for Why crontab scripts are not working?

It is also possible that the user's password has expired. Even root's password can expire. You can tail -f /var/log/cron.log and you will see cron fail with password expired. You can set the password to never expire by doing this: passwd -x -1 <username>

In some systems (Debian, Ubuntu) logging for cron is not enabled by default. In /etc/rsyslog.conf or /etc/rsyslog.d/50-default.conf the line:

# cron.*                          /var/log/cron.log

should be edited (sudo nano /etc/rsyslog.conf) uncommented to:

cron.*                          /var/log/cron.log

After that, you need to restart rsyslog via

/etc/init.d/rsyslog restart

or

service rsyslog restart 

Source: Enable crontab logging in Debian Linux

In some systems (Ubuntu) separate logging file for cron is not enabled by default, but cron related logs are appearing in syslog file. One may use

cat /var/log/syslog | grep cron -i

to view cron-related messages.


Viewing latest article 32
Browse Latest Browse All 48

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>