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.

Cron Jobs -- not working anymore...?

Discussion in 'General Discussion' started by OneSizeFitsAll, Oct 4, 2003.

  1. OneSizeFitsAll

    OneSizeFitsAll Well-Known Member

    Joined:
    Dec 19, 2002
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    Since October 02 at midnight, ALL my "Databases' Back-up - Scheluded Cron Jobs" have stopped working.
    I am puzzled :)

    To make sure CPanel was not the cause, I just upgraded CPanel to version "8.4.0-STABLE 92". No change.

    All my Crons are structured like this:
    (In this sample, the Cron is doing a database backup everyday at 15:00)

    --------------------------------------------------
    PHP File
    located in:
    home/thiscustomer/crons/ThisDatabaseName_1500.php
    --------------------------------------------------
    The content of this PHP file is:

    Code:
    #!/usr/bin/php -q
    
    <? 
    $today = date( "Ymd", time() ); 
    
    $dumpcmd = "mysqldump -u [B]thiscustomer[/B]_database[B]User[/B] 
    -pdatabase[B]UserPassword[/B] --databases [B]thiscustomer[/B]_[B]ThisDatabaseName[/B] --opt | gzip > "; 
    $dumpcmd .= "crons/[B]ThisDatabaseName[/B]/1500/[B]ThisDatabaseName[/B].sql.gz"; 
    
    system($dumpcmd); 
    ?>
    

    --------------------------------------------------
    For calling this Script from inside CPanel, I have this in "Advanced (Unix Style):
    php -q < ./crons/ThisDatabaseName_1500.php

    I also tried this:
    /usr/bin/php/home/thiscustomer/crons/ThisDatabaseName_1500.php

    No success... ?

    Thank you for your help.

    Kind Regards,

    cPanel.net Support Ticket Number:
     
    #1 OneSizeFitsAll, Oct 4, 2003
    Last edited: Oct 4, 2003
  2. Damian

    Damian Well-Known Member

    Joined:
    Oct 1, 2001
    Messages:
    95
    Likes Received:
    1
    Trophy Points:
    8
    We're seeing the same thing for one our PHP scripts. The cron job actually executes but it's the PHP script being run via the command line that doesn't.

    We know the cron runs because we still receive the email notification, but instead of the body of the email message containing the results from the PHP script it just contains a text copy of the script itself.

    If you try executing the script from a shell prompt you will see what I mean - the script will be displayed to the terminal instead of executing.

    cPanel.net Support Ticket Number:
     
  3. OneSizeFitsAll

    OneSizeFitsAll Well-Known Member

    Joined:
    Dec 19, 2002
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    Solution:

    My expert came with this solution (~):

    Replace this line:
    $dumpcmd .= "crons/ThisDatabaseName/1500/ThisDatabaseName.sql.gz";

    With this:
    $dumpcmd .= "~/crons/ThisDatabaseName/1500/ThisDatabaseName.sql.gz";

    Regards,

    cPanel.net Support Ticket Number:
     
  4. zye

    zye Well-Known Member

    Joined:
    Dec 6, 2002
    Messages:
    96
    Likes Received:
    1
    Trophy Points:
    8
    php not working!

    here we have the same issue - php scripts running via cron just output the file itself

    we use cacti to monitor - its also an php script has also stopped working and aslo our billing software which is also written in PHP.

    Running: WHM 8.4.0 cPanel 8.4.0-S92
    RedHat 8.0 - WHM X v2.1

    PHP 4.3.1 (cli) (built: Jun 8 2003 13:18:38)

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

    Strange thing is on another server running
    WHM 8.4.0 cPanel 8.4.0-S92
    RedHat 7.3 - WHM X v2.1

    PHP 4.3.0 (cli) (built: Feb 8 2003 21:44:21)

    everything is running fine

    We would need an urgent solution for this matter.

    Thank you
    ZYE

    cPanel.net Support Ticket Number:
     
    #4 zye, Oct 7, 2003
    Last edited: Oct 7, 2003
  5. OneSizeFitsAll

    OneSizeFitsAll Well-Known Member

    Joined:
    Dec 19, 2002
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    ...was working but not working anymore......?

    Running: WHM 8.4.0 cPanel 8.4.0-S92
    RedHat 8.0 - WHM X v2.2.4

    PHP 4.3.2
    MySQL version 4.0.15-standard

    In need of a solution

    Kind Regards,

    cPanel.net Support Ticket Number:
     
    #5 OneSizeFitsAll, Oct 8, 2003
    Last edited: Oct 8, 2003
  6. zye

    zye Well-Known Member

    Joined:
    Dec 6, 2002
    Messages:
    96
    Likes Received:
    1
    Trophy Points:
    8
    i found a solution - upgrade to php 4.3.3

    and i also disabled automatic updates ( i only update security updates ) so this will not happen again

    guess stable is "NOT" really stable

    good luck

    ps. stop apache when upgrading and chservd

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page