+ Reply to Thread
Results 1 to 7 of 7

Thread: Cron Job

  1. #1
    disturbedart is offline x10 Lieutenant disturbedart is an unknown quantity at this point
    Join Date
    Jun 2006
    Location
    Swindon
    Posts
    458

    Cron Job

    Hey i tried to get a cron job to run so it backs up my Website DB every 4 hours.
    I got the command to work but i get quoted "permission Denied" How do i by pass this?

    The command i'm trying to use is

    /home/distart/public_html/phpMySQLAutoBackup/run.php

    Okay I fixed CHMOD and now i get:

    /home/distart/public_html/phpMySQLAutoBackup/run.php: line 1: ?php
    : No such file or directory
    /home/distart/public_html/phpMySQLAutoBackup/run.php: line 2: /************************************************** ********
    : No such file or directory
    /home/distart/public_html/phpMySQLAutoBackup/run.php: line 3: access-logs: command not found
    /home/distart/public_html/phpMySQLAutoBackup/run.php: line 4: syntax error near unexpected token `uses'
    /home/distart/public_html/phpMySQLAutoBackup/run.php: line 4: ` * (uses the MySQL export library from *


    Help ASAP please.

    Thanks everyone.
    Last edited by disturbedart; 09-03-2007 at 01:37 PM.
    Free Professional Webdesigns!

    Check it out!
    .................................................. ......................

  2. #2
    Brandon's Avatar
    Brandon is offline Former Senior Account Rep Brandon is on a distinguished road
    Join Date
    Jun 2006
    Location
    Tewksbury, MA
    Posts
    9,589

    Re: Cron Job

    Use

    /usr/bin/php -q /home/distart/public_html/phpMySQLAutoBackup/run.php
    Thanks,
    Brandon Long

  3. #3
    disturbedart is offline x10 Lieutenant disturbedart is an unknown quantity at this point
    Join Date
    Jun 2006
    Location
    Swindon
    Posts
    458

    Re: Cron Job

    Thanks Brandon

    EDIT:

    Tried it for every minute and im not getting anything at all now

    Basically i want the cron job to load that page so it automatically backs up my DB.
    Last edited by disturbedart; 09-03-2007 at 02:11 PM.
    Free Professional Webdesigns!

    Check it out!
    .................................................. ......................

  4. #4
    disturbedart is offline x10 Lieutenant disturbedart is an unknown quantity at this point
    Join Date
    Jun 2006
    Location
    Swindon
    Posts
    458

    Re: Cron Job

    *bump*
    Sorry to bump im worried its going inactive.
    Free Professional Webdesigns!

    Check it out!
    .................................................. ......................

  5. #5
    Brandon's Avatar
    Brandon is offline Former Senior Account Rep Brandon is on a distinguished road
    Join Date
    Jun 2006
    Location
    Tewksbury, MA
    Posts
    9,589

    Re: Cron Job

    May I ask were this is hosted, with us or another host?
    Thanks,
    Brandon Long

  6. #6
    halohalo's Avatar
    halohalo is offline x10Hosting Member halohalo is an unknown quantity at this point
    Join Date
    Aug 2007
    Posts
    54

    Re: Cron Job

    Quote Originally Posted by disturbedart View Post
    Thanks Brandon

    EDIT:

    Tried it for every minute and im not getting anything at all now

    Basically i want the cron job to load that page so it automatically backs up my DB.
    Well, trying to backup a database once every minute sounds like an intense chain of processes. If you have ssh shell access, you may want to check the processing threads to see if your backup processes are just overlapping each other.

    ps -ef | grep yourusernamehere
    also

    top
    If you have permission for that function, will show what's running, including your backup process. I'm not sure how big your database is so I don't know about how long it takes to back up. If it takes longer than a minute you're making a mess of the server's resources trying to cron it this job at one minute apart.
    Halo-Halo
    Resident Pogy-Pinoy and
    Technology Enthusiast

    My Technology Forums
    A Site for Anime Fans

    A link to one of the most awesome free, online, sci-fi strategy games created to date. Click on my userbar below to join me in the Ceti galaxy for a couple of rounds in deep space...


    Go Tritons!

  7. #7
    disturbedart is offline x10 Lieutenant disturbedart is an unknown quantity at this point
    Join Date
    Jun 2006
    Location
    Swindon
    Posts
    458

    Re: Cron Job

    Thank you Halo, also this is hosted here. on x10.
    Its on the StaticPaid Server "Skyy"

    Also the minute thing was just to test if it would even run the command, it use to with the old command. But now it just does nothing.
    Last edited by disturbedart; 09-05-2007 at 09:51 AM.
    Free Professional Webdesigns!

    Check it out!
    .................................................. ......................

+ Reply to Thread

Similar Threads

  1. Cron Jobs
    By stuffradio in forum Scripts & 3rd Party Apps
    Replies: 9
    Last Post: 11-12-2007, 07:01 PM
  2. Cron Jobs
    By esnola in forum Soporte
    Replies: 2
    Last Post: 08-13-2007, 01:53 PM
  3. Cron Job tab gone?
    By zero5854 in forum Free Hosting
    Replies: 4
    Last Post: 08-12-2007, 10:59 PM
  4. cron jobs help
    By TarinC in forum Scripts & 3rd Party Apps
    Replies: 5
    Last Post: 09-19-2006, 03:45 PM
  5. Scripts PHP con cron
    By uriens in forum Soporte
    Replies: 3
    Last Post: 08-25-2006, 06:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers