Based on this crontab, cron.daily will run at 4:20 am every day, and "spamassassin stop" will run at 30 minutes past each hour; that is, once an hour.  However, if this is a typical Linux system (RedHat, SuSE, etc.) the init scripts are in located /etc/rc.d/init.d rather than just /etc/init.d .  Perhaps this is your problem.
 
To get a script to run every 30 minutes, you can use this syntax:
 
0,30 * * * * /path/to/script
 
 
Hope that helps
Pierre
 
-----Original Message-----
From: Casey King [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 05, 2005 3:57 PM
To: SpamAssassin Users
Subject: Spamd / RDJ

Because RDJ –lints SA, I have tried to create a cron job that would stop Spamd from running.  I do not want it using up so much memory since MailScanner calls SA on its own.  My crontab looks like this:

 

-----------------------------

SHELL=/bin/bash

PATH=/sbin:/bin:/usr/sbin:/usr/bin

MAILTO=root

HOME=/

 

# run-parts

01 * * * * run-parts /etc/cron.hourly

02 4 * * * run-parts /etc/cron.daily

22 4 * * 0 run-parts /etc/cron.weekly

42 4 1 * * run-parts /etc/cron.monthly

 

# shut down spamassassin after rulesdejour does an update

30 * * * * root /etc/init.d/spamassassin stop

-------------------------

 

From what I “believe” I had set, is for spamassassin to be shut down every 30 minutes.

 

In /etc/cron.daily is my update_spamassassin_rules.

 

-----------------------------------

#!/bin/bash

 

[ -x /etc/mail/spamassassin/RulesDuJour/rules_du_jour ] || exit 0

exec /etc/mail/spamassassin/RulesDuJour/rules_du_jour

/etc/init.d/spamassassin stop

exit 0

----------------------------------------

 

Seeing the cron job was not working, I added the /etc/init.d/spamassassin stop to the file hoping it would stop SA after RDJ finished.  This has been no help.

 

Does anyone have another idea of what I can do to shutdown SA after RDJ lints SA?  I am getting tired of stopping SA from the command line.

 

Reply via email to