You should be able to add a ttl option on the task definition, including on scheduled tasks. This would be the default for the task but could be overriden when calling trigger() and passing in the ttl option.
The ttl is the time allowed for the run to start before it is “expired” and won’t run if it doesn’t run during that period.
