votes up 2

Invalid time format for a daily job (valid format is HH:MM(:SS)?)

Package:
Exception Class:
ScheduleValueError

Raise code

e ScheduleValueError(
                "Invalid unit (valid units are `days`, `hours`, and `minutes`)"
            )
        if not isinstance(time_str, str):
            raise TypeError("at() should be passed a string")
        if self.unit == "days" or self.start_day:
            if not re.match(r"^([0-2]\d:)?[0-5]\d:[0-5]\d$", time_str):
                raise ScheduleValueError(
                    "Invalid time format for a daily job (valid format is HH:MM(:SS)?)"
                )
        if self.unit == "hours":
            if not re.match(r"^([0-5]\d)?:[0-5]\d$", time_str):
                raise ScheduleValueError(
                    "Invalid time format for an hourly job (valid format is (MM)?:SS)"
                )

        if self
😲 Agile task management is now easier than calling a taxi. #Tracklify

Ways to fix

votes up 3 votes down

schedule.every().day.at("08:30:00").do('requiredfunction')

correct format for parsing time is : "HH:MM:SS"

Jun 13, 2022 singerprashant2000 answer

Add a possible fix

Please authorize to post fix