PDA

View Full Version : run my own cron job


Ed1011
03-03-2006, 07:41 PM
Since siteGround offers no site backup utility, I would like to run my own cron job do the site backup. Which interpreter does siteGround offer? #!/bin/sh returns a bad interpreter error. :mad:
TIA

Tom
03-10-2006, 09:04 AM
hm... this is strange...

both /bin/sh and /bin/bash should be working... Have you set the file with permissions 755 ?

Ed1011
03-14-2006, 01:20 PM
This is the error msg.
/bin/sh: line 1: backup1.sh: command not found


The backup1.sh has been set to permission 755

the source of backup1.sh
#!/bin/bash
#
# Creator:andutt@linuxforums.org the ultimate linuxforum 2003
#
# Description:Mysqldatabase backup program
#
# The DBUSER-parameter specifices which user to connect with
DBUSER=anyone
echo
echo "All backups completed OK"
echo

traction
03-15-2006, 06:13 AM
I posted this in the forum section and I got no reply, since there is a thread started and it got a reply in here I thought I would copy the post to here.

"What is the command line I need to use to backup my SMF forum every night.

I have been searching the net but cant find anything to help, I guess I must be looking in to the wrong place. "

Tom
03-15-2006, 10:38 AM
Hm, that script works fine for me:


~# chmod +x test.sh
~# ./test.sh

All backups completed OK

~# cat test.sh

#!/bin/bash
#
# Creator:andutt@linuxforums.org the ultimate linuxforum 2003
#
# Description:Mysqldatabase backup program
#
# The DBUSER-parameter specifices which user to connect with
DBUSER=anyone
echo
echo "All backups completed OK"
echo


It SHOULD be running fine. If it is not.. please contact our tech support. If they are not able to help you (not likely but.. it happens) ask them to forward your ticket to Tom (myself) and I will try to make it work :)

As for the SMF backup, that traction mentioned, is it the files that you would like to backup or the db? May be both?

traction
03-16-2006, 11:12 AM
As for the SMF backup, that traction mentioned, is it the files that you would like to backup or the db? May be both?

It would be both so that if the worst happened and we lost our forum we could get it up and running again with no problems.

Tom
03-17-2006, 09:55 AM
Our tech support writes such scripts upon request. You can contact them if you wish, I believe they will be able to help you..

We do keep backup of all the data though :)

PatHMV
05-26-2006, 03:45 PM
I've been trying to get cron to run my cron.php file for my Drupal installation and can't get the path right. The cron.php file is in the /www directory, which is directly under the root directory for my account. In the command field for chrontabs on the cPanel, I've tried http://www.mysite.com/cron.php, http://mysite.com/www/cron.php, /www/cron.php, cron.php. In my e-mail error messages, I keep getting this: "bin/sh: [whatever I tried]: No such file or directory." What path do I need to put for this? Thanks for any help!