INNER CODE UNIT · Python

_schedule_next_run

MichielMe/fastscheduler · src/fastscheduler/main.py:413

    def _schedule_next_run(self, job: Job):
        """Calculate and set the next run time for a repeating job."""
        if job.schedule_type in ["daily", "weekly", "hourly", "cron"]:
            self._calculate_next_run(job)
        elif job.interval:
            job.next_run = time.time() + job.interval

    def _run(self):
        """Main scheduler loop - runs in background thread."""
        if not self.quiet:
            logger.info("Scheduler main loop started")

        while self.running:
            try:
                now = time.time()
                jobs_to_run = []

                with self.lock:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…