The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

exiqgrep not running in my cron

Discussion in 'General Discussion' started by lordcage, Aug 13, 2006.

  1. lordcage

    lordcage Member

    Joined:
    Apr 29, 2004
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    I'm trying to run from my Cron the following line:

    /usr/sbin/exiqgrep -o 86400 -i | /usr/bin/xargs exim -Mrm

    I got it here in this forum, and it cleans messages older than 24h in the queue . The cmd line works perfectly, but only when ran manually.

    It's not working from my crontab. I tried to put it into a script, but it's still not working.

    My crontab is:

    4 * * * * /etc/rc.d/limpa_queue_exim > /dev/null 2>&1

    root@hserv3 [~]# cat /etc/rc.d/limpa_queue_exim
    /usr/sbin/exiqgrep -o 86400 -i | /usr/bin/xargs exim -Mrm

    /etc/rc.d/limpa_queue_exim is chmoded to 755.

    Any ideas on why it's not working ???
     
  2. randomuser

    randomuser Well-Known Member

    Joined:
    Jun 25, 2005
    Messages:
    147
    Likes Received:
    0
    Trophy Points:
    16
    just a guess.. try /usr/sbin/exim instead of just exim
     
  3. lordcage

    lordcage Member

    Joined:
    Apr 29, 2004
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    Worked!! Thanks!!
     
Loading...

Share This Page