Skip to content

get_time_until_run in core.py gives an error #241

@GerardNL

Description

@GerardNL

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions