Periodic no backup

Hi
I wrote a script to backup my Database. So I put the file in the folder
Code:
/etc/periodic/daily/

Code:
-rwxr-xr-x  1 root  wheel  1359 Jul  9 08:13 220.backup-mysql

In my log I get the following:
Code:
Start Backup: Mon Jul 12 03:01:15 CEST 2010
MySQL-Datenbanken werden gesichert - Anzahl: 0
MySQL-Backup: 0/0 erfolgreich
MySQL-Backup wird komprimiert
MySQL-Backup: Raeume Backup(s) auf
MySQL-Backup abgeschlossen
################################################

If I run the script by hand, I get the following output:
Code:
Start Backup: Mon Jul 12 13:56:54 CEST 2010
MySQL-Datenbanken werden gesichert - Anzahl: 4
MySQL-Backup: 4/4 erfolgreich
MySQL-Backup wird komprimiert
MySQL-Backup: Raeume Backup(s) auf
MySQL-Backup abgeschlossen
################################################

What do I have to do, that the backup works in the daily backup?
`
Thanks

Daniel
 
As DutchDaemon sagt: periodic may require full pathnames for everything outside of /bin/ /sbin/ /usr/bin/ & /usr/sbin/.

It might behave like crontab(1) (crontab(5)), to wit:
Code:
# /etc/crontab - root's crontab for FreeBSD
#
# $FreeBSD: src/etc/crontab,v 1.33.2.1.4.1 2010/06/14 02:09:06 kensmith Exp $
#
SHELL=/bin/sh
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin

Or it may be worse and pass no $PATH to the shell at all, I don't know.
 
I put the line following line in:
Code:
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
and it works perfect.

Thanks for your help
 
Back
Top