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 through cron?

Discussion in 'General Discussion' started by noimad1, Sep 30, 2011.

  1. noimad1

    noimad1 Well-Known Member

    Joined:
    Mar 27, 2003
    Messages:
    627
    Likes Received:
    0
    Trophy Points:
    16
    Ok, so I'm having a bit of a problem. I need to clear out mail mail queue of any messages to AOL that are older than 2 minutes. I can run this command through ssh:

    /usr/sbin/exiqgrep -r aol -o 120 -i | xargs exim -Mrm


    But trying it in the crontab -e doesn't work:

    * * * * * /usr/sbin/exiqgrep -r aol -o 120 -i | xargs exim -Mrm


    Please don't ask why I need to do this it is a long story.

    Any ideas on why this wouldn't work through a cronjob?
     
  2. noimad1

    noimad1 Well-Known Member

    Joined:
    Mar 27, 2003
    Messages:
    627
    Likes Received:
    0
    Trophy Points:
    16
    Nevermind I finally found the problem...forgot the /usr/sbin/exim:

    * * * * * /usr/sbin/exiqgrep -r aol -o 120 -i | xargs /usr/sbin/exim -Mrm
     
Loading...

Share This Page