Automator script sometimes fails when run as Application
I have created an Automator script that performs the followig five actions:
1) Run Shell Script
Command is rsync -av --exclude-from="/Volumes/X/rsync Library/rsync Exclusions/username-exc.txt" --log-file="/Volumes/X/rsync Library/rsync Logs/rsync-username.txt" /Users/username/ /Volumes/X/rsync-username
shell: /bin/hash
Pass input; as arguments
Ignore this action's input: checked
I found these parameters by looking at others' attempts to automate rsync. The rsync Terminal command works perfectly - I have been using it for a while.
2) New Text File (to create a run-specific log, separate from the master created by rsync)
3) Add Date or Time (to add date to log filename)
4) Add Date or Time (to add date to log filename)
5) Copy Finder Items (to copy the log to the Desktop so that I might see when the job is complete)
This workflow functions properly when I run it from within Automator.
The problem is that when I have saved the script as an Automator Application, it sometimes runs fine and on other occasions - seemingly randomly, maybe one minute later - I get an error: 'The action "Run Shell Script" encountered an error. // Check the action's properties and try running the workflow again.' Disks are still connected, etc.
I thought maybe I could compromise and use Automator Runner (1.1.2), but when I Open With that nothing seems to happen at all.
Any thoughts would be appreciated. Thank you.
MacBook Air, OS X Mountain Lion (10.8.2)