Cron shell script not executing diskutil command

I'm trying to learn how to use cron for repetative tasks. I have an external disk that needs to be unmounted and remounted every hour due to some problems that a backup utility (specifically, TimeMachine) is having repeatedly accessing the device. I've created a shell script that will find the mount point of the drive, unmount it, and then remount it. Here's the code:

#!/bin/sh

# Finds the device node of the drive 'Rebel Base', and saves it to variable i
export i=`diskutil info 'Rebel Base' | grep 'Device Node' | cut -d : -f 2 | sed 's/^ *//g' | sed 's/ *$//g';`
# unmounts device found at variable i
hdiutil unmount -force $i
sleep 1
# remounts device found at variable i
hdiutil mountvol $i

When I run this as a shell script, it works just fine. However, cron returns the following error:

line 4: diskutil: command not found
hdiutil: unmount: no file specified
Usage: hdiutil unmount [options] <mountpoint>
hdiutil unmount -help
hdiutil: mountvol: no device specified
Usage: hdiutil mountvol [options] <devname>
hdiutil mountvol -help

My cron looks like this:

* 9-16 * * 1-5 sh /Users/danielmarcus/Dropbox/programming/relaunchRebel.sh

What am I doing wrong here? Any and all help is very much appreciated.

Get the PATH to hdiutil:

type hdiutil
which hdiutil

and set that at the beginning of your script:

#!/bin/sh
export PATH
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/path/to/hdiutil
...

If you do not declare a PATH variable in your script or crontab then the PATH will be

/usr/bin:/bin

hdiutil manipulates disk images. It will unmount attached file systems but you should be using diskutil to unmount them. diskutil may not need the device node to unmount a file system. I think you can use the mount point. If you want to use the device node then the following should work

mount | awk '/Rebel Base/ {print $1}'

You should not need to unmount and mount a file system in order to make your backup strategy work. It might be time to rethink what you are doing.

This worked out well - I no longer get the error message I was getting previously. Since this is a workaround for another unknown issue, it will suffice until I figure out what the problem is with timemachine accessing the disk.