If you are wanting to run a command in the background while avoiding the shell command timeout, one may want to try:
your_command > /dev/null 2>&1 &
When I run a python program xxxx.py
in the background, I use the following which launches the python program in the background and quickly returns control back to HA without incurring the timeout log error.
/usr/bin/env nohup python3 /config/shell_commands/xxxx.py > /dev/null 2>&1 &