You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gojobs/cron_spec_test.go

21 lines
669 B

2 years ago
package gojobs
import "testing"
func TestSpec(t *testing.T) {
t.Log("每隔10秒执行一次", GetSpecSeconds(10))
t.Log("每隔10秒执行一次", GetFrequencySeconds(10))
t.Log("每隔60秒执行一次", GetSpecSeconds(60))
t.Log("每隔60秒执行一次", GetFrequencySeconds(60))
t.Log("每隔10分钟执行一次", GetSpecMinutes(10))
t.Log("每隔10分钟执行一次", GetFrequencyMinutes(10))
t.Log("每隔60分钟执行一次", GetSpecMinutes(60))
t.Log("每隔60分钟执行一次", GetFrequencyMinutes(60))
t.Log("每天n点执行一次", GetSpecHour(10))
t.Log("每天n点执行一次", GetFrequencyHour(10))
}