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

get_time_until_run in core.py gives an error #241

Open
GerardNL opened this issue Oct 6, 2023 · 0 comments
Open

get_time_until_run in core.py gives an error #241

GerardNL opened this issue Oct 6, 2023 · 0 comments

Comments

@GerardNL
Copy link

GerardNL commented Oct 6, 2023

I've been using the django_cron for scheduled jobs and it's working pretty well. While looking at getting a status back from the jobs, I tried to use the function "get_time_until_run" in the CronJobBase class.

However, "cls.schedule.run_every_mins" (line 73) will give an error if the job is scheduled to run at fixed hours, instead of at certain intervals.

Not a big issue, but I think a simple if-statement could catch it at least?

something like (to be inserted before line 67:

if cls.schedule.run_every_mins == None:
      return timedelta()

that way it will at least not error.

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

1 participant