Hi,

I'm having a weird issue.

I have a script that runs perfectly when the system boots up and when I run it manually, but fails when it's started by 'cron'.

This is the script (the real script is actually much bigger, but this are the things I'm having problems with):

Code:
#!/bin/bash

MOUNT_DIR="/home/user/Dropbox/crypt"
VAULT_FILE="/home/user/Dropbox/truecrypt-file"
KEY_FILE="/home/user/Escritorio/truecrypt-keyfile"

truecrypt -d "${VAULT_FILE}"
zenity --warning --text="Volume un-mounted.\n Starting Dropbox.";

# Piece of code where Dropbox is executed and after is finished, stopped. This works fine.

truecrypt --keyfiles="$KEY_FILE" "${VAULT_FILE}" "${MOUNT_DIR}"
Now, neither the 'zenity' nor the 'truecrypt' command will work when the script is launched from 'cron'. I know 'cron' is launching the script correctly because I have a log output (not shown in this excerpt of the script) that records whenever the script is started.

This is the 'cron' command I use by the way:

Code:
0 */10 * * * /home/gabriel/check-dropbox.sh
I use this because I see no reason why Dropbox should run more than twice a day (once when the system starts, and once more 10 hours later)

Any ideas?

Regards,
Gabriel