dbader / dbader/schedule

Issue with running job in 2 specific day in a week

Open
#499 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
12.3k
Forks
999
PR merge metrics
No merged PRs in 30d

Description

```
def run_schedule_save_video(start_time, end_time, duration, buffer, s3_access_key, s3_access_secret_key, s3_bucket):
print("start run_schedule_save_video")
import schedule
import time

schedule.every().monday.at("10:00").do(write_video, start_time[0]['Monday'], end_time[0]['Monday'], duration, buffer, s3_access_key, s3_access_secret_key, s3_bucket, "job monday")
schedule.every().tuesday.at("10:00"]).do(write_video,start_time[0]['Tuesday'], end_time[0]['Tuesday'], duration, buffer, s3_access_key, s3_access_secret_key, s3_bucket, "job monday")

while True:
schedule.run_all()
time.sleep(1)
```

I have a schedule just run in Monday and Tuesday in a week. When i try to run this code , it executed the job on Monday after that it continue run the job on Tuesday despite of it just Monday today.

Any suggest for this case?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the supplied run_schedule_save_video function with only Monday and Tuesday jobs, then inspect how schedule.run_all() handles pending jobs. Compare the scheduled job times with the loop's behavior; done means explaining or correcting why the Tuesday job runs on Monday.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.