Cron Path


I am trying to run a Cron job for the automysqlbackup program. Not sure what I need to put as the path to the file when setting it up through control panel. The file is in the root folder of a site - I tried putting, but the email I receive says no such file.

thanks in anticipation

Developing commercial awareness
Strategy, marketing and finance training


That’s not a path, that is a URI (and a uri-path or url-path is the part after the hostname starting with the slash). When asked for a path to a file or program, you need to specify a filesystem path. Given username “username”, and domain “”, here are what you need to use for situations:

/home/username = filesystem path to user “home directory”
/home/username/ = filesystem path to “web directory”

It is not a good idea put shell scripts in the web directory though. Try making another directory for shell scripts and other files that you don’t want people to download from the web site:

/home/username/bin = maintenance programs and scripts

If you do have files in the web directory that shouldn’t be downloaded, change the permissions to deny world read access. (ie 750 for directories or 640 for files).

As for setting the cron job, your path might look like /home/username/bin/ - but also don’t forget to set the permissions on that file to include execute access.

:cool: -//-


The path propably is /home/yourusername/


Many thanks for such a comprehensive answer - really appreciated.

And it worked! Well - almost - I got the script to run, but it couldn’t create the directory for the backups. I have now created a directory ‘backups’ at the same level as the bin directory that you suggested. I have now edited automysqlbackup to point at home/username/backups/. Hopefully this will work - I don’t know how to make the script run manually, so I have to wait for the on-the-hour scheduling through control panel cron settings.

Once again, many thanks.
Developing commercial awareness
Strategy, marketing and finance training


Hi - many thanks for your reply - I am almost there with the advice from Atropos7.
Developing commercial awareness
Strategy, marketing and finance training


To run the script manually,

Login to shell

and type ~/bin/

This will work given you have granted execute permissions. Otherwise you can do something like

bash /home/username/bin/

(The difference is that with execute permissions, shell reads the beginning of the file to find out the program to run to execute the script)

:cool: -//-