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.

Problems with CRON... not sure what this means

Discussion in 'General Discussion' started by Diane, Mar 26, 2004.

  1. Diane

    Diane Registered

    Joined:
    Nov 14, 2003
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Following instructions from some posts on the forum, I logged
    into WebPanel and added a cron job to clear out a specific email
    box each day. This is what I put:

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

    echo > home/USERNAME/mail/USERNAME/inbox

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

    I don't think it's working because I'm getting emails with the
    following....

    /bin/sh: line 1: home/USERNAME/mail/USERNAME/inbox: No such file or directory


    What does it mean and how can I get it to work?
    That directory IS there and it's a working email account.

    Also, after I get it working -- what can I put in the command
    line to make it NOT email me each time?


    Thanks for your help!
     
  2. elleryjh

    elleryjh Well-Known Member

    Joined:
    Apr 12, 2003
    Messages:
    479
    Likes Received:
    0
    Trophy Points:
    16
    you need a slash before you path.


    echo > /home/USERNAME/mail/USERNAME/inbox


    Are you running this as root, or as the user?


    The simple way is to use the cron function in the user's cpanel and set "Email address where output from commands run via crontab will be sent" to :blackhole: Or you would send them to the account that is being deleted everyday :)
     
  3. Diane

    Diane Registered

    Joined:
    Nov 14, 2003
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Well, that was simple enough... thanks! :p

    I'm running this as a user --

    I can set it to :blackhole: for some of my domains, but there are others that I'm running scripts on that I DO want the emails from... I guess it's all or nothing? :rolleyes:
     
  4. elleryjh

    elleryjh Well-Known Member

    Joined:
    Apr 12, 2003
    Messages:
    479
    Likes Received:
    0
    Trophy Points:
    16
    All cron receipts have to go to the same place for each user, but you could set a filter to delete messages with a subject of "cron <user@server> echo > /home/USERNAME/mail/USERNAME/inbox"

    Simple enough, right?
     
  5. Diane

    Diane Registered

    Joined:
    Nov 14, 2003
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    OK -- thanks so much for your help! :)
     
Loading...

Share This Page