I have no idea why this script is not working. The script has been made executable and I get no output in mail or the snap.log that I set up to catch anything. I've run as root at the command line and it worked perfectly, but once it's been added to cron, nothing happens. I'm completely stumped and any help would be appreciated. Thanks.
Running on OS X Mavericks.
#!/bin/bash
# Ignores white space in directory names
IFS=$'\n'
# Sets all variables needed
export DLY_BKP=/Volumes/BKP/Daily_bkp.`/bin/date +%m%d%y`
export DLY_LOG=AAAdaily_bkp.txt
export BKP_DIR=/Users/Backup_logs
export VMPATH=/Applications/VMware\ Fusion.app/Contents/Library
#####################################################
# Finds all running VMs
$VMPATH/vmrun list | /usr/bin/sed 1d > $DLY_BKP/$DLY_LOG
# Creates snapshots of all running VMs on the server
while read vm; do
$VMPATH/vmrun -T ws snapshot $vm "snapshot `/bin/date +%m/%d/%Y`"
$VMPATH/vmrun -T ws deleteSnapshot $vm "snapshot `/bin/date -v-2d +%m/%d/%Y`"
done < $DLY_BKP/$DLY_LOG > $DLY_BKP/snap.log 2>&1