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

Add run tolerance #139

Merged
merged 2 commits into from
May 27, 2022
Merged

Add run tolerance #139

merged 2 commits into from
May 27, 2022

Conversation

Red-Teapot
Copy link
Contributor

Add run_tolerance_seconds parameter to Schedule class.

This parameter specifies time window (in seconds) to run the job.

Basically, value of the parameter gets added to current time in the code.

For example, consider a job that runs every 5 minutes and last time it was run at 00:00:00. For example, runcrons command gets called every five minutes starting from 00:00:00.

Without this parameter, the job will be run next time at 00:10:00.

If run_tolerance_seconds is set to non-zero value, the job will be run next time at 00:05:00. That makes job run period more precise.

By default, run_tolerance_seconds is 0, so this does not affect existing jobs.

This parameter (schedule.run_tolerance_seconds) allows to run the job slightly earlier.

For example, consider a job that runs every 5 minutes and last time it was run at 00:00:00. For example, runcrons command
gets called every five minutes starting from 00:00:00.

Without this parameter, the job will be run next time at 00:10:00.

If run_tolerance_seconds is set to non-zero value, the job will be run next time at 00:05:00. That makes job run period
more precise.

By default, run_tolerance_seconds is 0, so this does not affect existing jobs.
@JedrzejMaluszczak JedrzejMaluszczak merged commit f301336 into Tivix:master May 27, 2022
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