From 0c4814f9a2bf915b608bdbb755fd4c1e63e686a0 Mon Sep 17 00:00:00 2001 From: Gustavo Carneiro Date: Mon, 15 Oct 2018 09:36:39 +0100 Subject: [PATCH] Fix a logic error in handling `@reboot` schedule. Closes #22. --- yacron/cron.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yacron/cron.py b/yacron/cron.py index ecfe622..f17746b 100644 --- a/yacron/cron.py +++ b/yacron/cron.py @@ -102,7 +102,7 @@ async def spawn_jobs(self, startup) -> None: logger.debug("Job %s (%s) is scheduled for startup (@reboot)", job.name, job.schedule_unparsed) await self.launch_scheduled_job(job) - else: + elif isinstance(job.schedule, CronTab): crontab = job.schedule # type: CronTab if crontab.test(get_now(job.utc)): logger.debug("Job %s (%s) is scheduled for now",