systemtek

Member
Jul 21, 2006
16
0
151
Staffordshire, England
Hi All

I have written a script to use with the cron to backup mysql databases.

Problem is when the script runs i get a e-mail to say it cant find the location of what i am trying to run, i have checked with my web provider and the path is :

/home/USERNAME/

so in the command i am doing

bash /home/USERNAME/public_html/backup.sh

The backup.sh is in the public_html dir.

But it wont find it when that is that path, what am i doing wrong ? missing the obvious i guess but what ?

Thanks
 

elleryjh

Well-Known Member
Apr 12, 2003
479
0
166
Looks ok. What's the exact error you get?

Edit: It might not know where bash is. Put the full path to bash in the cron, or just put #!/path/to/bash at the top of the script, chmod u+x it, and execute it directly.
 
Last edited: