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

issue when os time sync after app starting #352

Open
veritastry opened this issue Nov 18, 2020 · 1 comment
Open

issue when os time sync after app starting #352

veritastry opened this issue Nov 18, 2020 · 1 comment

Comments

@veritastry
Copy link

Hello All , I have encounter an issue.
we can get issue when we do step as follow:

  1. change OS time , by slower then network time;
  2. start our app, as sometime MM:SS start a job;
  3. sync OS time, from network;
    -------------when time MM:SS get, bug job can't start-------------
@skowrons
Copy link

From the docs:

Cron entries are stored in an array, sorted by their next activation time. Cron
sleeps until the next job is due to be run.
Upon waking:

  • it runs each entry that is active on that second
  • it calculates the next run times for the jobs that were run
  • it re-sorts the array of entries by next activation time.
  • it goes to sleep until the soonest job.

The important part is the last line. The Cron will go to sleep until the next job is due. So this isn't exactly a bug but wanted behavior.
Maybe the package should consider some catching mechanic for system clock change events?

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

No branches or pull requests

2 participants