Schedule
Schedule copied to clipboard
Is it still working ?
The code
let planWorkTimer = Plan.every(.monday, .tuesday, .wednesday, .thursday, .friday).at("6:49 am").do {
print("planWorkTimer is start")
}
not print.
me too
It won't work if you do not have an available RunLoop (see here). You either need to specify a queue like:
let planWorkTimer = Plan.every(.monday, .tuesday, .wednesday, .thursday, .friday).at("6:49 am").do(queue: .global()) {
print("planWorkTimer is start")
}
Or have a RunLoop:
let planWorkTimer = Plan.every(.monday, .tuesday, .wednesday, .thursday, .friday).at("6:49 am").do {
print("planWorkTimer is start")
}
CFRunLoopRun()