Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set a daily 00:00:00 trigger task, from April 2 every day trigger time into 01::00:00 #37

Closed
yuyidegit opened this issue Apr 6, 2022 · 5 comments · Fixed by #39
Closed

Comments

@yuyidegit
Copy link

Describe the bug
设置了一个每天00:00:00触发的任务,从4月2号开始每天触发时间变成01::00:00了,不知道是否和时令有关.

To Reproduce
程序从3月份开始运行,4月2号前都是正常触发的.
计时器设置:
let task = TaskBuilder::default()
.set_frequency_repeated_by_cron_str("0 0 0 * * * *")
.set_task_id(1)
.spawn_async_routine(body)
.unwrap();

Desktop (please complete the following information):

  • OS: Ubuntu 18.04 LTS
  • delay-timer :0.11.1
  • timezone: Asia/Shanghai
  • rustflags: ["--cfg", "unsound_local_offset"]
@BinChengZhao
Copy link
Owner

yuyidegit

Have you ever actively changed task information during runtime, or inadvertently used the same task-id to insert a task?

Affected tasks: There are several things that can affect a task, such as system hibernation, system clock instability, or insufficient delay-timer.

If you confirm that there are no inadvertent updates and the system is stable, I will prepare a machine to perform the replication carefully.

ZH:

请问你有没有运行过程中主动更改任务信息, 或者无意间使用了同一个task-id去insert任务?

影响任务: 一般会有几方面, 比如系统休眠、系统的时钟不稳定、delay-timer的不足.

如果您确认没有无意间的更新、且系统稳定正常, 我会认真准备一个机器去执行复现.

@yuyidegit
Copy link
Author

yuyidegit

Have you ever actively changed task information during runtime, or inadvertently used the same task-id to insert a task?

Affected tasks: There are several things that can affect a task, such as system hibernation, system clock instability, or insufficient delay-timer.

If you confirm that there are no inadvertent updates and the system is stable, I will prepare a machine to perform the replication carefully.

ZH:

请问你有没有运行过程中主动更改任务信息, 或者无意间使用了同一个task-id去insert任务?

影响任务: 一般会有几方面, 比如系统休眠、系统的时钟不稳定、delay-timer的不足.

如果您确认没有无意间的更新、且系统稳定正常, 我会认真准备一个机器去执行复现.

hello,系统只有这一个任务,正常运行过程中不会添加任务.程序运行时间是3-31到4-6,
操作系统不会自动休眠,时钟应该没问题,程序每120会写一条日志,日志里的时间都正常的.
4-2之前,都是每天00::00:00准时触发,4-2之后都是01::00:01触发的
下面是所有的 delay-timer日志
2022-03-30T16:41:54.120784205+08:00 INFO delay_timer::entity: tokio-thread started
2022-03-30T16:41:54.120792559+08:00 INFO delay_timer::entity: tokio-thread started
2022-03-30T16:41:54.120807741+08:00 INFO delay_timer::entity: tokio-thread started
2022-03-30T16:41:54.120783384+08:00 INFO delay_timer::entity: tokio-thread started
2022-03-30T16:41:54.120882391+08:00 INFO delay_timer::entity: tokio-thread started
2022-03-30T16:41:54.121360189+08:00 INFO delay_timer::entity: tokio-thread started
2022-03-30T16:42:18.443974581+08:00 INFO delay_timer::entity: tokio-thread started
2022-03-30T16:42:18.444032709+08:00 INFO delay_timer::entity: tokio-thread started
2022-03-30T16:42:18.444057523+08:00 INFO delay_timer::entity: tokio-thread started
2022-03-30T16:42:18.444092557+08:00 INFO delay_timer::entity: tokio-thread started
2022-03-30T16:42:18.444106055+08:00 INFO delay_timer::entity: tokio-thread started
2022-03-30T16:42:18.444257961+08:00 INFO delay_timer::entity: tokio-thread started
2022-03-31T00:00:00.445488077+08:00 INFO delay_timer::timer::task: async_spawn_by_tokio: routine-exec; task_id=1 record_id=6914964457290600448
2022-04-01T00:00:01.445977752+08:00 INFO delay_timer::timer::task: async_spawn_by_tokio: routine-exec; task_id=1 record_id=6915326849350504448
2022-04-02T01:00:01.514124517+08:00 INFO delay_timer::timer::task: async_spawn_by_tokio: routine-exec; task_id=1 record_id=6915704336974745600
2022-04-03T01:00:01.484964162+08:00 INFO delay_timer::timer::task: async_spawn_by_tokio: routine-exec; task_id=1 record_id=6916066724685156352
2022-04-04T01:00:01.445831809+08:00 INFO delay_timer::timer::task: async_spawn_by_tokio: routine-exec; task_id=1 record_id=6916429112441704448
2022-04-05T01:00:01.445279558+08:00 INFO delay_timer::timer::task: async_spawn_by_tokio: routine-exec; task_id=1 record_id=6916791500307304448
2022-04-06T01:00:01.498522767+08:00 INFO delay_timer::timer::task: async_spawn_by_tokio: routine-exec; task_id=1 record_id=6917153888307122176

@BinChengZhao BinChengZhao changed the title 设置了一个每天00:00:00触发的任务,从4月2号开始每天触发时间变成01::00:00了 Set a daily 00:00:00 trigger task, from April 2 every day trigger time into 01::00:00 Apr 8, 2022
@BinChengZhao
Copy link
Owner

yuyidegit

Have you ever actively changed task information during runtime, or inadvertently used the same task-id to insert a task?
Affected tasks: There are several things that can affect a task, such as system hibernation, system clock instability, or insufficient delay-timer.
If you confirm that there are no inadvertent updates and the system is stable, I will prepare a machine to perform the replication carefully.
ZH:
请问你有没有运行过程中主动更改任务信息, 或者无意间使用了同一个task-id去insert任务?
影响任务: 一般会有几方面, 比如系统休眠、系统的时钟不稳定、delay-timer的不足.
如果您确认没有无意间的更新、且系统稳定正常, 我会认真准备一个机器去执行复现.

hello,系统只有这一个任务,正常运行过程中不会添加任务.程序运行时间是3-31到4-6, 操作系统不会自动休眠,时钟应该没问题,程序每120会写一条日志,日志里的时间都正常的. 4-2之前,都是每天00::00:00准时触发,4-2之后都是01::00:01触发的 下面是所有的 delay-timer日志 2022-03-30T16:41:54.120784205+08:00 INFO delay_timer::entity: tokio-thread started 2022-03-30T16:41:54.120792559+08:00 INFO delay_timer::entity: tokio-thread started 2022-03-30T16:41:54.120807741+08:00 INFO delay_timer::entity: tokio-thread started 2022-03-30T16:41:54.120783384+08:00 INFO delay_timer::entity: tokio-thread started 2022-03-30T16:41:54.120882391+08:00 INFO delay_timer::entity: tokio-thread started 2022-03-30T16:41:54.121360189+08:00 INFO delay_timer::entity: tokio-thread started 2022-03-30T16:42:18.443974581+08:00 INFO delay_timer::entity: tokio-thread started 2022-03-30T16:42:18.444032709+08:00 INFO delay_timer::entity: tokio-thread started 2022-03-30T16:42:18.444057523+08:00 INFO delay_timer::entity: tokio-thread started 2022-03-30T16:42:18.444092557+08:00 INFO delay_timer::entity: tokio-thread started 2022-03-30T16:42:18.444106055+08:00 INFO delay_timer::entity: tokio-thread started 2022-03-30T16:42:18.444257961+08:00 INFO delay_timer::entity: tokio-thread started 2022-03-31T00:00:00.445488077+08:00 INFO delay_timer::timer::task: async_spawn_by_tokio: routine-exec; task_id=1 record_id=6914964457290600448 2022-04-01T00:00:01.445977752+08:00 INFO delay_timer::timer::task: async_spawn_by_tokio: routine-exec; task_id=1 record_id=6915326849350504448 2022-04-02T01:00:01.514124517+08:00 INFO delay_timer::timer::task: async_spawn_by_tokio: routine-exec; task_id=1 record_id=6915704336974745600 2022-04-03T01:00:01.484964162+08:00 INFO delay_timer::timer::task: async_spawn_by_tokio: routine-exec; task_id=1 record_id=6916066724685156352 2022-04-04T01:00:01.445831809+08:00 INFO delay_timer::timer::task: async_spawn_by_tokio: routine-exec; task_id=1 record_id=6916429112441704448 2022-04-05T01:00:01.445279558+08:00 INFO delay_timer::timer::task: async_spawn_by_tokio: routine-exec; task_id=1 record_id=6916791500307304448 2022-04-06T01:00:01.498522767+08:00 INFO delay_timer::timer::task: async_spawn_by_tokio: routine-exec; task_id=1 record_id=6917153888307122176

Theoretically, this problem only occurs in versions prior to 0.11.1,

I have also prepared a machine to try to reproduce your problem.

请静候佳音

@BinChengZhao
Copy link
Owner

Friend your scene I have reproduced,

I will find time to adjust the program behavior in the near future, thanks for your feedback!

BinChengZhao added a commit that referenced this issue May 9, 2022
@BinChengZhao
Copy link
Owner

@yuyidegit Fix at V0.11.2, I look forward to your feedback on successful use.

:)

@BinChengZhao BinChengZhao linked a pull request May 9, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants