Questions tagged [python-schedule]

Third-party module for job scheduling. Run Python functions (or any other callable) periodically using a friendly syntax.

Python job scheduling for humans. Run Python functions (or any other callable) periodically using a friendly syntax.

  • A simple to use API for scheduling jobs, made for humans.
  • In-process scheduler for periodic jobs. No extra processes needed!
  • Very lightweight and no external dependencies.
  • Excellent test coverage.

Available on pypi.

16 questions
2
votes
0 answers

Multiply schedulers in different threads run tasks later than scheduled

I have a script for a Raspberry Pi, which should send reports two times a day at 8:10 and at 20:10 according to a schedule. But usually the task (send data function) starts from 2-10 minutes late from the time scheduled, though I use multiply…
Ivan
  • 121
  • 1
  • 9
1
vote
1 answer

How can I bring in updated google spreadsheet values into my python script without stopping and restarting it?

I have a python script that runs 24/7 and have a google spreadsheet that contains input values for the script. I update these values regularly. On a clean start, the initial value pulls in exactly as it should. The issue is when it needs to be…
1
vote
1 answer

How to get schedule.run_pending() to perform functions based on user input?

I'm currently building a small Tkinter app that executes a pre-written function based on the numbers a user inputs. When I run my code, everything works fine until I get to the function named count_func(). The goal of this Tkinter app is to execute…
psps
  • 13
  • 4
1
vote
0 answers

Need to reduce scheduling delays using Python sched module

So I have read the documentation, articles about the different clocks (monotonic, time_perf, process_time) accessible from Python, and I am still getting unacceptable delays when calling a function using a scheduler. I am getting delays of 12 to 30…
1
vote
1 answer

Run multiple schedule jobs at same time using Python Schedule

I am using cx Oracle and schedule module in python. Following is the psuedo code. import schedule,cx_Oracle def db_operation(query): ''' Some DB operations like 1. Get connection 2. Execute query 3. commit result (in case of DML…
KL_KISNE_DEKHA_HAI
  • 649
  • 11
  • 26
1
vote
2 answers

time.sleep(300) not allowing script to stop thread | python |

I am writing a code to insert data to mongodb every 5 minutes ON and OFF The problem here is on keyword interrupt my thread should be stop and exit the code execution Once first record is inserted to DB my time.sleep(300) will make the script…
1
vote
1 answer

I want run a job on buissness days only in the python schedule module

does anyone know how to do this in the python schedule module? there is little to no documention on what I want to do. my code…
runnerX
  • 56
  • 4
0
votes
0 answers

How can I run an API server (Python flask in a Docker container), and also have it execute scheduled tasks like with cron?

I have python / Flask running in a Docker container deployed to a cloud service (AWS). It reponds to HTTP API requests (GET, POST) Everything is working fine there with this. -- Now I want to implement some recurring tasks that run inside the…
user10664542
  • 1,106
  • 1
  • 23
  • 43
0
votes
1 answer

Use python schedule module in an efficient manner

I want to use python scheduler module for an api call. I have two main tasks. 1-Generate token at interval of 10 mins 2-Call the api using the token generated in previous step The expected behavior is when a user calls the api it should use the same…
Hannah
  • 163
  • 2
  • 12
0
votes
1 answer

A Python script with a scheduled task is "skipping" several intervals when running for some hours. Is it the sleep mode?

On macOS, I am running a Python script in the background using the package schedule to perform a task every ten seconds, which is just logging the current time. I leave it for several hours for testing but it always "skips" many intervals, sometimes…
0
votes
1 answer

I have a function that is scheduled to run every hour. How can i pass an argument only the first time I run it?

I am creating an investing bot. Every hour it runs a function that makes predictions every hour. In order to test the bot, I give it a variable called balance = 1000. I want to only pass it the first time I run it, because the following times the…
robocop96
  • 1
  • 1
0
votes
1 answer

Running aioschedule with other coroutine in python

I have two coroutines one of which is using aioschedule. This is my code import aioschedule as schedule import asyncio async def foo(): while True: print('foooooo') await asyncio.sleep(5) async def bar(): while True: …
Arief G
  • 33
  • 7
0
votes
1 answer

python schedule not working for specific time

I am using the python schedule module. I have a function that I am trying to run at a specfic time. When I try to run it on my local machine it runs at the specified time, however on an ubuntu server it doesn't. When I try to run the task every 5…
user
  • 1,022
  • 2
  • 8
  • 30
0
votes
1 answer

Does Python Schedule wait for code to finish?

I want to trigger a code using schedule module as follows: # This is the function that I want to schedule and this function is calling a script file that does the actual processing. def run_codefile(): print("LOG:: Running code file...") …
0
votes
0 answers

Python using schedule library to download files

I have a list of ids which are called oaids and I want them to be downloaded from monday to friday from midnight until 6pm, but only during a certain time period of the day. As it is a list, I want the job not to start again if it have been already…
3nomis
  • 1,175
  • 1
  • 9
  • 30
1
2