This is part of the configuration of the task itself, so if no timeout is specified, it can theoretically run forever (e.g. streaming use case). Please refer timeout section in below link.
https://docs.databricks.com/dev-tools/api/latest/jobs.html#operation/JobsCreate