Cron Job

disturbedart

Member
Messages
474
Reaction score
1
Points
18
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:

Brandon

Former Senior Account Rep
Community Support
Messages
19,181
Reaction score
28
Points
48
Use

/usr/bin/php -q /home/distart/public_html/phpMySQLAutoBackup/run.php
 

disturbedart

Member
Messages
474
Reaction score
1
Points
18
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:

Brandon

Former Senior Account Rep
Community Support
Messages
19,181
Reaction score
28
Points
48
May I ask were this is hosted, with us or another host?
 

halohalo

New Member
Messages
54
Reaction score
0
Points
0
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


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.
 

disturbedart

Member
Messages
474
Reaction score
1
Points
18
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:
Top