How to us Apple’s Automator to run a shell script in the background?

I wrote a simple bash script that invokes fswatch to monitor a specific file for changes. When a change is detected, another script writes a line to a log file. The script looks like this:

#!/usr/bash
fswatch -0 watched | xargs -0 -n 1 -I {} script.sh

script.sh is:

#!/bin/bash
echo "$(date): file has been changed" >> result

When I call this from the command line and append an ampersand to make it a backgroup job, things work as expected. Touching the monitored file results in a new line added to the log file. Issuing a ps command, reveal fswatch and xargs running as processes.

If I create an Automator workflow to run in a shell the above as a bash command, Automator issues a beep and it appears that the command was run successfully except, there are no subprocesses created and touching the watched file does not result in the line being added to the log file. The beep bothers me but I can find no indication that something failed.

Note that for simplification, I’ve left off the paths to the file and script. In reality, they have absolute paths.

I am basically mimicking what I found on sites like this one which all seem to say that this should work. What am I doing incorrectly?