Sched is a Python package for scheduling events. Use this tag for questions about the Sched package.
Questions tagged [sched]
10 questions
1
vote
1 answer
How to correctly use enterabs from scheduler
I'm trying to schedule something to run periodically, using the code below:
import sched
import time
from datetime import datetime, timedelta
def foo(s, t_end):
now = datetime.now()
print(now)
# Schedule the next run of this function,…

Gautam
- 1,079
- 14
- 21
0
votes
0 answers
Ignoring past events with python sched.py
I would like to schedule a series of absolutely-timed events that will be invoked after an unknown delay. This means that some events might be in the past at the moment we run the scheduler. However, in my application expired events at the start of…

P Fernandez
- 21
- 4
0
votes
2 answers
Schedule an iterative function every x seconds without drifting
Complete newbie here so bare with me. I've got a number of devices that report status updates to a singular location, and as more sites have been added, drift with time.sleep(x) is becoming more noticeable, and with as many sites connected now it…

Mark Goodwin
- 1
- 1
0
votes
0 answers
why periodic python sched function repeats itself every second instead of repeat every other n minutes?
I want my script to run every n minutes starting from NOT NOW, but rather starting from the time I specified.
When I do:
def periodic(scheduler, interval, action, actionargs=()):
schedule_data_update.enterabs(interval, 1, periodic,
…

MuhammedTech
- 17
- 5
0
votes
1 answer
Scheduling functions/commands in python
I am attempting a simple script that schedules a set of commands. I want to build, but I am stuck with the initial steps using the sched2 package
What I ultimately trying to do is to have a set of commands that will execute at a set of time delays.…

jack kelly
- 320
- 1
- 8
0
votes
1 answer
Print sched queue with human readable time
I want to print the queue from sched scheduler with human-readable time.
But whatever I try I get weird results despite the event are executed in proper time and order.
How can achieve that?
Current code
scheduler =…

Damian Grzanka
- 275
- 2
- 13
0
votes
1 answer
Generating coordinates in every 30 seconds
I want to write a function which can produce each circle coordinates in every 30 seconds. So far my code is like this:
import sched, time
import numpy as np
scheduler = sched.scheduler(time.time, time.sleep)
def coords():
theta = np.linspace(0,…

sumita1998
- 1
- 1
0
votes
1 answer
Loop function every x seconds and break loop when condition is no longer met
I am coding a discord bot with python, I am running into difficulties with the next feature. When the message: ('user' joined) is read the bot should start looping the function every x seconds until the message: ('user' left) is read.
I have been…

justTJ
- 1
- 1
0
votes
2 answers
Invalid Argument when implementing sched
I've written a basic wrapper around sched.scheduler, but I'm getting:
File "/usr/local/anaconda3/lib/python3.7/sched.py", line 149, in run
delayfunc(time - now)
OSError: [Errno 22] Invalid argument
What is the cause of this error? I'm…

P i
- 29,020
- 36
- 159
- 267
-2
votes
1 answer
Can't seem to use the 'sched' module the way I want it to work
The python project I'm working on, is a webpage that outputs covid data and news at a scheduled time. The project must use the sched module.
The issue I'm having it to do with schedule_covid_update() function. When calling the function. You have 2…

Gaming Elite
- 1
- 2