Enabling Cron logs for Mac OSX

Recently, I had the need to debug a Cron job and check if it is really ran on schedule. Most tutorial on Cron and Linux recommend looking into /var/log/syslog.log. But having looked far and wide in my Mac file directory, I wasn’t able to find one until I stumbled upon this instruction on enabling cron logging on Mac:

Open your /etc/syslog.conf and add the following line:

cron.* /var/log/cron.log

Restart syslog by:

sudo launchctl unload /System/Library/LaunchDaemons/com.apple.syslogd.plist
sudo launchctl load /System/Library/LaunchDaemons/com.apple.syslogd.plist

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s