I'm running on a couple of different Linux distros (Fedora 11, CentOS 5 and SuSE 10.2) and often run into a problem where a new script that I want to run as a cron job works fine when called direct from the command line, but fails when called from cron due to slight variations in the PATH or other required environment variables.
Is there a way I can test run an individual script as if it's being run from cron, without having to run the entire crontab or use run-parts to run the entire cron.daily/ .hourly etc. directory ? I guess I could temporarily edit my crontab to run the script in the next couple of minutes, but I'd rather have a more standalone solution so that I don't risk messing up the crontab.