Some jobs are supposed to take ten minutes and then, once in a while, hang for a day. A timeout on the start does not help with that. systemd has a limit for the total run time.
[Service]
RuntimeMaxSec=2h
The docs for systemd.service(5) say that a service that runs longer than this is terminated and put into a failure state. The default is infinity, which means no limit. The option was added in systemd 229.
A long-running worker that sometimes hangs is a good fit. The hung run is ended and the unit shows up in systemctl --failed, so you notice it.
You can spread the limit a little with RuntimeRandomizedExtraSec=, added in version 250. It adds a random extra time between 0 and the value you give, and it does nothing unless RuntimeMaxSec= is set.
The caveat is in the docs as well: RuntimeMaxSec= has no effect on Type=oneshot services, because they exit right after activation. For those you limit the activation with TimeoutStartSec= instead. Services of Type=notify can extend the runtime by sending EXTEND_TIMEOUT_USEC= until they report STOPPING=1 or exit.
Also remember that the stop itself follows TimeoutStopSec=, so a service that ignores SIGTERM is still killed with SIGKILL after that time.
Further reading: systemd.service: RuntimeMaxSec=