apscheduler

APScheduler to do jop every day withon 11:15am to 2:15 pm on 15 min delay

APScheduler to do jop every day withon 11:15am to 2:15 pm on 15 min delay Question: I need to do a job with 15 mins interval within 11:15 am to 2:15 pm IST every day, I tried using the below code but still i cannot able to get it. Any answers would be really appreciated. …

Total answers: 2

Python: Scheduling cron jobs with time limit?

Python: Scheduling cron jobs with time limit? Question: I have been using apscheduler. A recurring problem regarding the package is that if for any reason, a running job hangs indefinitely (for example if you create an infinite while loop inside of it) it will stop the whole process forever as there is no time limit …

Total answers: 1

Terminate all running threads at specific time

Terminate all running threads at specific time Question: i made a downloader based on a scheduler. So I wanted to download files at starting at a time of and stop before 6 am. I managed to achieve this using apscheduler that starts at 12 am, but i am not sure how to terminate all the …

Total answers: 1

How to use APScheduler in Python to run program daily at exact time?

How to use APScheduler in Python to run program daily at exact time? Question: I am trying to run something at the exact time to the second everyday. I have tried Schedule and used a sleep time of 1 second but it runs twice sometimes so I want to switch to APScheduler. But I have …

Total answers: 3

Apscheduler run job every weekday on specific time range

Apscheduler run job every weekday on specific time range Question: I have a current apscheduler that runs the job mon-fri and an interval of ~4 mins all day long. Is it possible to run the job for a specific time range? Lets say from 9:00 am to 5:00 pm in this case? My expression looks …

Total answers: 2

RuntimeError: There is no current event loop in thread in async + apscheduler

RuntimeError: There is no current event loop in thread in async + apscheduler Question: I have a async function and need to run in with apscheduller every N minutes. There is a python code below URL_LIST = [‘<url1>’, ‘<url2>’, ‘<url2>’, ] def demo_async(urls): “””Fetch list of web pages asynchronously.””” loop = asyncio.get_event_loop() # event loop …

Total answers: 7

APScheduler – ImportError: No module named 'apscheduler'

APScheduler – ImportError: No module named 'apscheduler' Question: I don’t know why I get this error: ImportError: No module named ‘apscheduler’. I tried to install the older version with: sudo pip uninstall apscheduler and then sudo pip install apscheduler==2.1.2 but this doesn’t worked for me. Here’s my code: import os ,subprocess from apscheduler.schedulers.blocking import BlockingScheduler …

Total answers: 4

How to run recurring task in the Python Flask framework?

How to run recurring task in the Python Flask framework? Question: I’m building a website which provides some information to the visitors. This information is aggregated in the background by polling a couple external APIs every 5 seconds. The way I have it working now is that I use APScheduler jobs. I initially preferred APScheduler …

Total answers: 1