[linux-help] Running init.d scripts from cron
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
I have been writing a perl script that will go through users unwanted e-mail
folders (imap)
and delete unwanted messages in the Trash and spam folders (uses spamassassin).
I want this script to be run from cron late at night, or early in the morning.
This is an old
486 with 24 megs of RAM using Woody I believe (2.2.19 kernel).
The problem is this:
In my script, I turn the fetchmail and inetd daemons off so as to prevent any
race conditions when
examining and modifiying the mail boxes with the intention of turning them back
on when done.
The scipt works fine if executed by hand '#./cleanup.pl', but if placed in the
crontab for root
it produced strange errors when staring and/or stopping the two daemons.
---- Out put of cron snippet ----
Stopping mail retrieval agent: fetchmail.
Restarting mail retrieval agent: fetchmail did not start.
---- End snippet ---
The second attempt it using /etc/init.d/fetchmail restart, to see if any
results are
different. The daemon runs as user fetchmail and it's pid file is
/var/run/fetchmail/.fetchmail.pid
I checked to see if after cron stops the service, if the pid file was still
there, but it wasn't.
I even tried executeing the fetchmail stop/start/restart deirectly from the
crontab to see if there
were any different results, but
-- This is the linux-help@xxxxxxxxx list. To unsubscribe,
visit http://www.complete.org/cgi-bin/listargate-aclug.cgi
- [linux-help] Running init.d scripts from cron,
Jeremy W . Chalfant <=
|
|