I have a backup script I made. It works prefect in ssh.
But when I try to run it as a cron, I get the following error:
This is the code in the script:
and I have tried 2 different cron commands:
/home/username/script.sh
and also
/bin/sh /home/username/script.sh
any ideas?
thanks,
Brian
But when I try to run it as a cron, I get the following error:
Code:
Error: MYSQL not found
This is the code in the script:
Code:
#!/bin/sh
MYSQL="$(which mysql)"
if [ -z "$MYSQL" ]; then
echo "Error: MYSQL not found"
exit 1
fi
and I have tried 2 different cron commands:
/home/username/script.sh
and also
/bin/sh /home/username/script.sh
any ideas?
thanks,
Brian