Giter Site home page Giter Site logo

Comments (6)

BinChengZhao avatar BinChengZhao commented on May 8, 2024 1

Hi @Chcp

I have found the root cause of the problem and implemented the fix, the unit test has passed now, you can try it in your test environment.

You can use the latest version:
delay_timer = "0.11.1"

from delay-timer.

rts-gordon avatar rts-gordon commented on May 8, 2024 1

Thanks, it is work now.

from delay-timer.

BinChengZhao avatar BinChengZhao commented on May 8, 2024

Your question is on my mind, and I'm using my rest time to look at it,

I have a point of confusion
dotenv::var("0 10 22 * * Monday,Tuesday,Wednesday,Thursday,Friday *")

I'm not quite sure why you're passing a cron string for the var function, which is supposed to pass a key (https://docs.rs/dotenv/0.15.0/dotenv/fn.var.html), are you sure the value you're getting through that function is reasonable and as expected for a cron-str?

from delay-timer.

rts-gordon avatar rts-gordon commented on May 8, 2024

Hi @BinChengZhao
Sorry for that, it is just a example. Actually, there are some cron string define in a .env file, the code is:

let task_builder_renew_sym = TaskBuilder::default()
            .set_frequency_repeated_by_cron_str(&dotenv::var("RENEW_SYMBOLS_CRON").unwrap())
            .set_schedule_iterator_time_zone(ScheduleIteratorTimeZone::Utc)
            .set_task_id(1)
            //.set_maximum_running_time(600)
            .spawn(body_renew_sym)?;

.env file

RENEW_SYMBOLS_CRON = "50 00 22 * * * *"

from delay-timer.

BinChengZhao avatar BinChengZhao commented on May 8, 2024

Hi @BinChengZhao Sorry for that, it is just a example. Actually, there are some cron string define in a .env file, the code is:

let task_builder_renew_sym = TaskBuilder::default()
            .set_frequency_repeated_by_cron_str(&dotenv::var("RENEW_SYMBOLS_CRON").unwrap())
            .set_schedule_iterator_time_zone(ScheduleIteratorTimeZone::Utc)
            .set_task_id(1)
            //.set_maximum_running_time(600)
            .spawn(body_renew_sym)?;

.env file

RENEW_SYMBOLS_CRON = "50 00 22 * * * *"

My friend, I have received your reply. I have realized the minimum recurrence case through your logic code and observed the situation in the last 48 hours, which is still normal at present.

I will continue to pay attention to the information on the server, a total of 7 days of sampling, to give you a feedback result.

from delay-timer.

BinChengZhao avatar BinChengZhao commented on May 8, 2024

Thanks, it is work now.
Thanks, you too, if you have any problems, please just open the issue and I will fix it carefully.

from delay-timer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.