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

Randomize firstCheckTime into the future, rather than scheduling in the past #481

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

esoderquist
Copy link

Presently a random offset is subtracted from time() and scheduled (such that the event is scheduled in the past, causing the job to execute on each WP-Cron execution since the scheduled time has passed). PR changes this to schedule the next update cycle at a randomized time in the future.

@YahnisElsts
Copy link
Owner

If I remember correctly, the intent of using a past timestamp was to ensure that the first update check would happen as soon as possible, and all future checks would happen with a randomized offset. See #323 for some relevant discussion.

By using a positive offset, we would lose that first, immediate check.

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 this pull request may close these issues.

None yet

2 participants