Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Dec 2002
    Posts
    46

    Question Cron Jobs -- not working anymore...?

    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 thiscustomer_databaseUser 
    -pdatabaseUserPassword --databases thiscustomer_ThisDatabaseName --opt | gzip > "; 
    $dumpcmd .= "crons/ThisDatabaseName/1500/ThisDatabaseName.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:
    Last edited by OneSizeFitsAll; 10-04-2003 at 03:39 PM.
    OneSizeFitsAll

  2. #2
    Member
    Join Date
    Oct 2001
    Posts
    92

    Default

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

    Default

    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:
    OneSizeFitsAll

  4. #4
    zye
    zye is offline
    Member
    Join Date
    Dec 2002
    Posts
    47

    Default 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:
    Last edited by zye; 10-07-2003 at 07:20 AM.

  5. #5
    Member
    Join Date
    Dec 2002
    Posts
    46

    Default

    ...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:
    Last edited by OneSizeFitsAll; 10-08-2003 at 08:37 PM.
    OneSizeFitsAll

  6. #6
    zye
    zye is offline
    Member
    Join Date
    Dec 2002
    Posts
    47

    Default

    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:

Similar Threads & Tags
Similar threads

  1. cron backup job using POST not working anymore ?
    By solsikkehaven in forum Data Protection
    Replies: 1
    Last Post: 02-22-2010, 11:49 PM
  2. Cron jobs in cPanel not working
    By footnet in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 10-02-2007, 04:27 PM
  3. cron jobs not working
    By InsaneSquirrel in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 12-16-2006, 01:36 AM
  4. cron jobs not working
    By carpman in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 08-14-2005, 06:14 AM
  5. Cron not working anymore?!
    By internetfab in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 04-23-2003, 09:11 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube