AFP548

cron job not executing in MACOSXS 10.3

Gentleones, In OSXS 10.3, I've added one line to my /etc/crontab, below: [code:1:26fe26a6a9]0,15,30,45 * * * * root /usr/sbin/learnspam [/code:1:26fe26a6a9] (There are tabs between each of the items in the above table.) As you can see, the /etc/crontab file has kept its permissions and ownerships: [code:1:26fe26a6a9]-r--r--r-- 1 root wheel 339 7 Jan 07:13 /etc/crontab [/code:1:26fe26a6a9] I know that it is still in working order because daily.out gets updated by /usr/sbin/periodic when it should. And you can see that the script being called has correct (as best I can tell--they match /usr/sbin/periodic) permissions, too: [code:1:26fe26a6a9]-r-xr-xr-x 1 root wheel 851 5 Jan 15:43 /usr/sbin/learnspam [/code:1:26fe26a6a9] (The script is at the bottom of this post.) Furthermore, I can execute the script manually with no errors with "sudo /usr/sbin/learnspam". But the sa-learn.log file shows no activity (it's there, owned by root, and reflects changes when I manually invoke learnspam), and indeed, none has occurred because, as reported by sa-learn, the spam builds up until I manually execute the learnspam script. Anyone got some clues on this one? Many thanks, Bill learnspam: [code:1:26fe26a6a9]#!/bin/sh - SPAM=/var/spool/imap/reportspam/*. HAM=/var/spool/imap/reportnotspam/*. LOGFILE=/var/log/sa-learn.log echo ' ' >> $LOGFILE echo "********************* Learnspam run starting " >> $LOGFILE date +%Y-%m-%d+%H:%M:%S >> $LOGFILE echo ' ' >> $LOGFILE echo 'Learning as spam:' >> $LOGFILE sa-learn --spam /var/spool/imap/user/reportspam/*. >> $LOGFILE 2>&1 rm /var/spool/imap/user/reportspam/[0-9]* sudo -u cyrus /usr/bin/cyrus/bin/reconstruct user/reportspam echo ' ' >> $LOGFILE echo 'Learning as ham:' >> $LOGFILE sa-learn --ham /var/spool/imap/user/reportnotspam/*. >> $LOGFILE 2>&1 rm /var/spool/imap/user/reportnotspam/[0-9]* sudo -u cyrus /usr/bin/cyrus/bin/reconstruct user/reportnotspam echo ' ' >> $LOGFILE echo 'Script learnspam done.' >> $LOGFILE # /usr/local/bin/sa-learn --rebuild -p /var/amavis/.spamassassin/user_prefs[/code:1:26fe26a6a9]
Exit mobile version