scheduled-tasks

Python, inability to calculate the remaining number of days with Schedule correctly and to obtain a dataframe related to it

Python, inability to calculate the remaining number of days with Schedule correctly and to obtain a dataframe related to it Question: from time import sleep import os from bs4 import BeautifulSoup import requests from datetime import datetime import schedule import time import pandas as pd import undetected_chromedriver as uc from selenium.webdriver.common.by import By from selenium.webdriver.support.ui …

Total answers: 1

Schedule task keeps repeating and never stops

Schedule task keeps repeating and never stops Question: def refresh_page(): driver.refresh() time.sleep(2) while True: if driver.find_element(By.CLASS_NAME, "mask2").is_displayed() == True: break schedule.every(1).minute.at(":00").do(refresh_page) schedule.run_pending() time.sleep(1) I was expecting it to only run the schedule command once, well it did work when it was not on ":00" seconds but as soon as it hits ":00" it keeps doing …

Total answers: 1

Deploy python worker to heroku without running immediatly

Deploy python worker to heroku without running immediatly Question: I have a simply python script that I deploy on Heroku as worker: Procfile: worker: python main.py The script is scheduled to run every day at a specific time with the Heroku Scheduler. I don’t want it to run to other times. Every time I push …

Total answers: 1

What's the difference between FastAPI background tasks and Celery tasks?

What's the difference between FastAPI background tasks and Celery tasks? Question: Recently I read something about this and the point was that celery is more productive. Now, I can’t find detailed information about the difference between these two and what should be the best way to use them. Asked By: Maksim Burtsev || Source Answers: …

Total answers: 1

Task scheduler shows python script shows as running but not working

Task scheduler shows python script shows as running but not working Question: I’ve been trying to run a lengthy Python script in the task scheduler in order to be able to run it for a long periods of time. I’ve tried using bat files, inserting just the path to the actual python file, python.exe files, …

Total answers: 2

ImportError: No module named schedule

ImportError: No module named schedule Question: I have made a scheduled programme on the osx system and I am trying to run it in the background, I read a different question about it and it said that this should work in the terminal by using this command, I have also tried downloading the modules as …

Total answers: 2

schedule task if exception has occurred python

schedule task if exception has occurred python Question: my question is simple as the title suggest try: response = requests.get(URL2) # download the data behind the URL open(zipname, "wb").write(response.content) # Open the response into a new file # extract zip file to specified location with ZipFile(zipname, ‘r’) as zip_file: zip_file.extractall(path=path) os.remove(zipname) # removes the downloaded …

Total answers: 3

Telegram bot to send auto message every n hours with python-telegram-bot

Telegram bot to send auto message every n hours with python-telegram-bot Question: I am quite new in building bots so I created a very simple Telegram bot and it works great but can’t figure out how to make the bot send messages every n minutes or n hours when /start_auto command is initiated. I made …

Total answers: 4

Scheduled program doesn't run every time–why not?

Scheduled program doesn't run every time–why not? Question: I currently have a python program that is both a web-scraper, and file-writer which updates databases that are on my desktop using windows 10 task scheduler. The problem is, for some reason the task scheduler doesn’t run the python files at the specified time 100% of the …

Total answers: 1

Running a python script through Windows Scheduler not working

Running a python script through Windows Scheduler not working Question: I am trying to automate a python script through the Windows Task Scheduler but its not working. At the end of my python script. two CSV files should be created but they arent. I tried the following: 1. Copied the address of my python.exe to …

Total answers: 4