#! /bin/csh # All lines below which start with #$ are DQS commands. #$ -cwd #$ -eo FARM_OUTPUT #$ -me #$ -G FARM-L 1 # Define addn command which avoids known DQS/attach problem alias addn 'set aenv = `attach -c -n \!*` ; eval $aenv; unset aenv' # Fake 5 minute program : long_running_program alias long_running_program 'sleep 300' #********** Start copying , repeat every 2 minutes **** addn farm start_copying -2 my_output FARM_OUTPUT echo " After 2 minutes, this message can be seen in echo " Farm_Copies/FARM_OUTPUT, but cannot be seen in FARM_OUTPUT. " long_running_program #********** Stop copying **** quit_copying farm_exit FARM_OUTPUT