Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Jul 2002
    Posts
    82

    Default Problems with cron jobs

    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. #2
    Member
    Join Date
    Jul 2002
    Posts
    82

    Default

    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. #3
    Member
    Join Date
    Jul 2002
    Posts
    82

    Default

    *bump*

    Any help would be appreciated

  4. #4
    Member
    Join Date
    Jul 2002
    Posts
    82

    Default

    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. #5
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Aug 2001
    Posts
    445

    Default

    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.
    Annette
    Hosting Matters, Inc.
    http://www.hostmatters.com

Similar Threads & Tags
Similar threads

  1. Help with cron jobs please
    By Brook in forum cPanel and WHM Discussions
    Replies: 29
    Last Post: 07-15-2009, 07:41 PM
  2. Cron Jobs
    By toroy in forum New User Questions
    Replies: 2
    Last Post: 10-30-2006, 06:13 AM
  3. Cron Jobs
    By Nico in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 02-23-2004, 05:18 PM
  4. Cron jobs
    By masterminds in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 02-21-2004, 08:48 AM
  5. cPanel cron jobs or cron.daily , cron.hourly , etc.?
    By spaceman in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 01-01-2004, 07:16 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube