Questions tagged [python-sched]

4 questions
2
votes
2 answers

Python script scheduling on google cloud

I'm facing this issue where i have a python script that needs to be run every day at 00:00am on google cloud, possibly using Google Cloud Run, what I'd like to know is something quite specific to which i couldn't find a good answer to, the thing…
2
votes
1 answer

Scheduler with blocking=False

The Python scheduler works well with default value blocking=True: import sched, time def print_time(a): print("From print_time", time.time(), a) s = sched.scheduler() s.enter(2, priority=1, action=print_time, argument=(1,)) s.enter(2,…
Basj
  • 41,386
  • 99
  • 383
  • 673
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
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…