@@ -22,11 +22,13 @@ import me.teble.xposed.autodaily.hook.base.BaseHook
22
22
import me.teble.xposed.autodaily.hook.base.ProcUtil
23
23
import me.teble.xposed.autodaily.task.util.ConfigUtil
24
24
import me.teble.xposed.autodaily.task.util.ConfigUtil.loadSaveConf
25
+ import me.teble.xposed.autodaily.task.util.format
25
26
import me.teble.xposed.autodaily.task.util.formatDate
26
27
import me.teble.xposed.autodaily.ui.ConfUnit
27
28
import me.teble.xposed.autodaily.ui.TaskErrorInfo
28
29
import me.teble.xposed.autodaily.ui.errInfo
29
- import me.teble.xposed.autodaily.ui.nextShouldExecTime
30
+ import me.teble.xposed.autodaily.ui.lastExecTime
31
+ import me.teble.xposed.autodaily.ui.reset
30
32
import me.teble.xposed.autodaily.ui.retryCount
31
33
import me.teble.xposed.autodaily.utils.LogUtil
32
34
import me.teble.xposed.autodaily.utils.TaskExecutor.AUTO_EXEC
@@ -240,12 +242,13 @@ suspend fun Activity.openJumpModuleDialog(lock: FileLock, file: File) {
240
242
suspend fun resetTasksNextExecTime () {
241
243
withContext(Dispatchers .IO ) {
242
244
val conf = loadSaveConf()
243
- val currCnDate = TimeUtil .getCNDate().formatDate ()
245
+ val currCnDate = TimeUtil .getCNDate().format ()
244
246
conf.taskGroups.forEach { group ->
245
247
group.tasks.forEach { task ->
246
- task.nextShouldExecTime ?.let {
248
+ task.lastExecTime ?.let {
247
249
if (it > currCnDate) {
248
- task.nextShouldExecTime = null
250
+ LogUtil .d(" 任务${task.id} 时间错误,当前时间:$currCnDate ,上次执行时间:$it " )
251
+ task.reset()
249
252
}
250
253
}
251
254
}
0 commit comments