OK so now my original code now looks like this
$cmd = "\"at $wtime $wdate <<< 'sftp -a -r -P xxx xxx@xxx.net:'$file\" /mnt/TRFR\"\"" ;
exec ("/bin/bash -c $cmd");
echo $cmd;
Figuring out where to put single quotes, double quotes and what quotes to escape was the tricky bit after getting php to use bash in stead of dash.
For those that are interested this code forms the basis of solution to fix the increasing unreliability of my Satellite Internet link. I live near whoopwhoop just beyond this side of Black Stump. (That's Aussie for in the middle of bloody nowhere).
Over the past few months my Internet regularly drops out screwing up my scheduled downloads. This code goes a long way to allowing me to resume the downloads after the link has been brought back up without human intervention. This would not be needed if Filezilla, or any other ftp client, could schedule downloads. The Internet link generally only goes down for a few minutes. It's enough to break the sftp.