diff --git a/modules/auth/wechat/cloudbrain.go b/modules/auth/wechat/cloudbrain.go index 5dbe0a4ea..193edd1da 100644 --- a/modules/auth/wechat/cloudbrain.go +++ b/modules/auth/wechat/cloudbrain.go @@ -77,7 +77,10 @@ func (CloudbrainStopMsg) ShouldSend(ctx *TemplateContext) bool { } for _, v := range setting.CloudbrainStoppedNotifyList { if v == ctx.Cloudbrain.JobType { - return true + if ctx.Cloudbrain.Duration > 0 && ctx.Cloudbrain.EndTime > 0 { + return true + } + break } } return false