Unclear why job executes multiple times
See original GitHub issueDescribe the bug Setting a cron job to run at ~4pm everyday but the job runs multiple times as the logs show.
To Reproduce
code
_job_defaults = {
"coalesce": True, # Trigger only one job to make up for missed jobs.
"max_instances": 1, # Allow only one execution of a job per time.
}
local_scheduler: BackgroundScheduler = BackgroundScheduler(
jobstores={
"default": job_store,
},
executors={
"default": ThreadPoolExecutor(),
},
timezone=_timezone,
job_defaults=_job_defaults,
)
@local_scheduler.scheduled_job(
# assuming trader runs in PDT timezone
name="notify.daily.report",
trigger=CronTrigger(
day_of_week="mon-fri",
hour="16",
jitter=120,
),
)
def my_func()
...
Logs:
Expected behavior Job should only run once ~4 pm.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:11 (7 by maintainers)
Top Results From Across the Web
c# - My job executes an arbitrary number of times even though ...
What I am seeing is that method get called multiple times (the amount varies from each run of the console application) and I...
Read more >is there a way to run the same job multiple times without ...
You might want to take a look at the process to see if there is a way to batch that job. Maybe record...
Read more >Snakefiles and Rules — Snakemake 7.19.1 documentation
Instead, resources are used to determine which jobs can be executed at the same time without exceeding the limits specified at the command...
Read more >Uncertain About Hiring, Some Companies Try 'Test Drives'
About half of the 30 people who have been asked to work on a trial basis have moved into full-time jobs, he said....
Read more >7 Ways to Motivate Employees in Uncertain Times
Here are a few tips for helping employees through uncertain times. ... ask how they're doing, and what support they need to do...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You are not using the latest version. Please upgrade and see if the error persists.
The improved jitter feature in v4.0.0a1 eliminates jitter as the cause of such issues.