I recommend using activity retry or always running a heartbeating activity for such a check. For more ideas, see this post.
BTW why do you use Timer with Selector instead of just workflow.Sleep?
timer := workflow.NewTimer(tCtx, time.Hour*24)
selector.AddFuture(timer, func(f workflow.Future) {
err = monitor.Check(ctx, time.Time{}, time.Time{}, false)
if err != nil {
cancel()
}
})
Can be reduced to:
err := workflow.Sleep(tCtx, time.Hours * 24)
if err != nil {
// handle cancellation
}
err = monitor.Check(ctx, time.Time{}, time.Time{}, false)