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 jobs

Discussion in 'General Discussion' started by Omar, Sep 26, 2002.

  1. Omar

    Omar Well-Known Member

    Joined:
    Jul 30, 2002
    Messages:
    82
    Likes Received:
    0
    Trophy Points:
    6
    I have a serious problem with a cron job:

    The cron job seems to be working correctly, it is part of a server monitoring script, and it seems to be setup correctly in cpanel:

    -----------------------------------------------------
    curl http://www.domain.com/path/to/cron/cron_page.php /dev/null 2&&1
    -----------------------------------------------------

    I use curl instead of GET because GET seems to use more of the CPU.

    But I get an e-mail sent to the main e-mail account (username, not a mail account that I setup) every time the cron task runs (I have replaced certain info for security reasons):

    -----------------------------------------------------
    Subject: Cron &username@servername& http://www.domain.com/path/to/cron/cron_page.php

    Message Content:

    /bin/sh: http://www.domain.com/path/to/cron/cron_page.php: No such file or directory
    -----------------------------------------------------

    As I said, the server monitoring is working perfectly, but I can't figure out why it's sending all these e-mails, especially when I've specified the /dev/null part.

    I have just recently noticed this problem, and I have an inbox full of about 20,000 + e-mails.

    A customer brought it to my attention because they are running a very similar cron task to fetch a webpage, and their account quota was relatively small, so the huge number of e-mails pushed their space to the limit.

    I would appreciate any help on this matter.

    Thank-you

    - Omar
     
  2. Omar

    Omar Well-Known Member

    Joined:
    Jul 30, 2002
    Messages:
    82
    Likes Received:
    0
    Trophy Points:
    6
    It seems there are also some e-mails that have the following in them instead:

    --------------------------------------------------------------
    % Total % Received % Xferd Average Speed Time Curr.
    Dload Upload Total Current Left Speed

    0 0 0 0 0 0 0 0 --:--:-- 0:00:00 --:--:-- 0
    0 0 0 0 0 0 0 0 --:--:-- 0:00:00 --:--:-- 0
    curl: (3) &url& malformed

    --------------------------------------------------------------
     
  3. Omar

    Omar Well-Known Member

    Joined:
    Jul 30, 2002
    Messages:
    82
    Likes Received:
    0
    Trophy Points:
    6
    *bump*

    Any help would be appreciated :)
     
  4. Omar

    Omar Well-Known Member

    Joined:
    Jul 30, 2002
    Messages:
    82
    Likes Received:
    0
    Trophy Points:
    6
    Bumping again

    Some more of my customers have started using cron jobs, and this is becoming a problem

    I would appreciate ANY help

    - Omar
     
  5. Annette

    Annette Well-Known Member
    PartnerNOC

    Joined:
    Aug 12, 2001
    Messages:
    445
    Likes Received:
    0
    Trophy Points:
    16
    Based on the URL string, it doesn't look like you're actually directing the output anywhere. Between the URL and dev/null, shouldn't there be a director?

    curl http://www.domain.com/path/to/cron/cron_page.php & /dev/null 2&&1

    That should kill off the mail notices.
     
Loading...

Share This Page