APScheduler on Pthon 3.5 - Error getting due jobs from job store
Receiving the following warning message from APScheduler v3.5.3 and I cannot find the cause.
WARNING:apscheduler.scheduler:Error getting due jobs from job store 'default': descriptor 'date' requires a 'datetime.datetime' object but received a 'int'
The program in which I have this problem was originally written for Python 2.7 and is currently being rewritten for Python 3.5
After I enabled logging for APScheduler, I can see the job being added to the job store named 'default'.
INFO:apscheduler.scheduler:Scheduler started
DEBUG:apscheduler.scheduler:Looking for jobs to run
DEBUG:apscheduler.scheduler:No jobs; waiting until a job is added
INFO:apscheduler.scheduler:Added job "Notifier.gather" to job store "default"
DEBUG:apscheduler.scheduler:Looking for jobs to run
DEBUG:apscheduler.scheduler:Next wakeup is due at 2018-11-11 18:33:32.954753-05:00 (in 29.996986 seconds)
About 30 seconds later, these messages are displayed. They repeat every 10 seconds instead of the 30 seconds I expected.
DEBUG:apscheduler.scheduler:Looking for jobs to run
WARNING:apscheduler.scheduler:Error getting due jobs from job store 'default': descriptor 'date' requires a 'datetime.datetime' object but received a 'int'
DEBUG:apscheduler.scheduler:Next wakeup is due at 2018-11-11 18:33:42.956582-05:00 (in 10.000000 seconds)
The code I use to set the job(s) and start APScheduler.
import atexit
from apscheduler.schedulers.background import BackgroundScheduler
class Notifier(object):
class NotificationClient(object):
def __init__(self, gather, timestamp):
self.gather = gather
self.timestamp = timestamp
def run(self):
self.timestamp = self.gather(self.timestamp)
def __init__(self):
self._logger = logging.getLogger(__name__)
self.notifiers =
# Add the jobs here
self.notifiers.append(self.NotificationClient(self.checkEmails, None))
# Start the scheduler
sched = BackgroundScheduler(timezone="America/New_York", daemon=True)
sched.start()
sched.add_job(self.gather, 'interval', seconds=30)
# Shuts down the scheduler when the main program exits
atexit.register(lambda: sched.shutdown(wait=False))
def gather(self):
# client.run() comes from the NotificationClient() class above
[client.run() for client in self.notifiers]
#####
# The function listed in self.notifiers.append()
def checkEmails(self, lastRun):
...code that counts unread emails...
return lastRun
# Start APScheduler
notifier = Notifier()
python-3.5 apscheduler
add a comment |
Receiving the following warning message from APScheduler v3.5.3 and I cannot find the cause.
WARNING:apscheduler.scheduler:Error getting due jobs from job store 'default': descriptor 'date' requires a 'datetime.datetime' object but received a 'int'
The program in which I have this problem was originally written for Python 2.7 and is currently being rewritten for Python 3.5
After I enabled logging for APScheduler, I can see the job being added to the job store named 'default'.
INFO:apscheduler.scheduler:Scheduler started
DEBUG:apscheduler.scheduler:Looking for jobs to run
DEBUG:apscheduler.scheduler:No jobs; waiting until a job is added
INFO:apscheduler.scheduler:Added job "Notifier.gather" to job store "default"
DEBUG:apscheduler.scheduler:Looking for jobs to run
DEBUG:apscheduler.scheduler:Next wakeup is due at 2018-11-11 18:33:32.954753-05:00 (in 29.996986 seconds)
About 30 seconds later, these messages are displayed. They repeat every 10 seconds instead of the 30 seconds I expected.
DEBUG:apscheduler.scheduler:Looking for jobs to run
WARNING:apscheduler.scheduler:Error getting due jobs from job store 'default': descriptor 'date' requires a 'datetime.datetime' object but received a 'int'
DEBUG:apscheduler.scheduler:Next wakeup is due at 2018-11-11 18:33:42.956582-05:00 (in 10.000000 seconds)
The code I use to set the job(s) and start APScheduler.
import atexit
from apscheduler.schedulers.background import BackgroundScheduler
class Notifier(object):
class NotificationClient(object):
def __init__(self, gather, timestamp):
self.gather = gather
self.timestamp = timestamp
def run(self):
self.timestamp = self.gather(self.timestamp)
def __init__(self):
self._logger = logging.getLogger(__name__)
self.notifiers =
# Add the jobs here
self.notifiers.append(self.NotificationClient(self.checkEmails, None))
# Start the scheduler
sched = BackgroundScheduler(timezone="America/New_York", daemon=True)
sched.start()
sched.add_job(self.gather, 'interval', seconds=30)
# Shuts down the scheduler when the main program exits
atexit.register(lambda: sched.shutdown(wait=False))
def gather(self):
# client.run() comes from the NotificationClient() class above
[client.run() for client in self.notifiers]
#####
# The function listed in self.notifiers.append()
def checkEmails(self, lastRun):
...code that counts unread emails...
return lastRun
# Start APScheduler
notifier = Notifier()
python-3.5 apscheduler
add a comment |
Receiving the following warning message from APScheduler v3.5.3 and I cannot find the cause.
WARNING:apscheduler.scheduler:Error getting due jobs from job store 'default': descriptor 'date' requires a 'datetime.datetime' object but received a 'int'
The program in which I have this problem was originally written for Python 2.7 and is currently being rewritten for Python 3.5
After I enabled logging for APScheduler, I can see the job being added to the job store named 'default'.
INFO:apscheduler.scheduler:Scheduler started
DEBUG:apscheduler.scheduler:Looking for jobs to run
DEBUG:apscheduler.scheduler:No jobs; waiting until a job is added
INFO:apscheduler.scheduler:Added job "Notifier.gather" to job store "default"
DEBUG:apscheduler.scheduler:Looking for jobs to run
DEBUG:apscheduler.scheduler:Next wakeup is due at 2018-11-11 18:33:32.954753-05:00 (in 29.996986 seconds)
About 30 seconds later, these messages are displayed. They repeat every 10 seconds instead of the 30 seconds I expected.
DEBUG:apscheduler.scheduler:Looking for jobs to run
WARNING:apscheduler.scheduler:Error getting due jobs from job store 'default': descriptor 'date' requires a 'datetime.datetime' object but received a 'int'
DEBUG:apscheduler.scheduler:Next wakeup is due at 2018-11-11 18:33:42.956582-05:00 (in 10.000000 seconds)
The code I use to set the job(s) and start APScheduler.
import atexit
from apscheduler.schedulers.background import BackgroundScheduler
class Notifier(object):
class NotificationClient(object):
def __init__(self, gather, timestamp):
self.gather = gather
self.timestamp = timestamp
def run(self):
self.timestamp = self.gather(self.timestamp)
def __init__(self):
self._logger = logging.getLogger(__name__)
self.notifiers =
# Add the jobs here
self.notifiers.append(self.NotificationClient(self.checkEmails, None))
# Start the scheduler
sched = BackgroundScheduler(timezone="America/New_York", daemon=True)
sched.start()
sched.add_job(self.gather, 'interval', seconds=30)
# Shuts down the scheduler when the main program exits
atexit.register(lambda: sched.shutdown(wait=False))
def gather(self):
# client.run() comes from the NotificationClient() class above
[client.run() for client in self.notifiers]
#####
# The function listed in self.notifiers.append()
def checkEmails(self, lastRun):
...code that counts unread emails...
return lastRun
# Start APScheduler
notifier = Notifier()
python-3.5 apscheduler
Receiving the following warning message from APScheduler v3.5.3 and I cannot find the cause.
WARNING:apscheduler.scheduler:Error getting due jobs from job store 'default': descriptor 'date' requires a 'datetime.datetime' object but received a 'int'
The program in which I have this problem was originally written for Python 2.7 and is currently being rewritten for Python 3.5
After I enabled logging for APScheduler, I can see the job being added to the job store named 'default'.
INFO:apscheduler.scheduler:Scheduler started
DEBUG:apscheduler.scheduler:Looking for jobs to run
DEBUG:apscheduler.scheduler:No jobs; waiting until a job is added
INFO:apscheduler.scheduler:Added job "Notifier.gather" to job store "default"
DEBUG:apscheduler.scheduler:Looking for jobs to run
DEBUG:apscheduler.scheduler:Next wakeup is due at 2018-11-11 18:33:32.954753-05:00 (in 29.996986 seconds)
About 30 seconds later, these messages are displayed. They repeat every 10 seconds instead of the 30 seconds I expected.
DEBUG:apscheduler.scheduler:Looking for jobs to run
WARNING:apscheduler.scheduler:Error getting due jobs from job store 'default': descriptor 'date' requires a 'datetime.datetime' object but received a 'int'
DEBUG:apscheduler.scheduler:Next wakeup is due at 2018-11-11 18:33:42.956582-05:00 (in 10.000000 seconds)
The code I use to set the job(s) and start APScheduler.
import atexit
from apscheduler.schedulers.background import BackgroundScheduler
class Notifier(object):
class NotificationClient(object):
def __init__(self, gather, timestamp):
self.gather = gather
self.timestamp = timestamp
def run(self):
self.timestamp = self.gather(self.timestamp)
def __init__(self):
self._logger = logging.getLogger(__name__)
self.notifiers =
# Add the jobs here
self.notifiers.append(self.NotificationClient(self.checkEmails, None))
# Start the scheduler
sched = BackgroundScheduler(timezone="America/New_York", daemon=True)
sched.start()
sched.add_job(self.gather, 'interval', seconds=30)
# Shuts down the scheduler when the main program exits
atexit.register(lambda: sched.shutdown(wait=False))
def gather(self):
# client.run() comes from the NotificationClient() class above
[client.run() for client in self.notifiers]
#####
# The function listed in self.notifiers.append()
def checkEmails(self, lastRun):
...code that counts unread emails...
return lastRun
# Start APScheduler
notifier = Notifier()
python-3.5 apscheduler
python-3.5 apscheduler
asked Nov 12 '18 at 0:07
Nathan Weiler
93
93
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53254499%2fapscheduler-on-pthon-3-5-error-getting-due-jobs-from-job-store%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53254499%2fapscheduler-on-pthon-3-5-error-getting-due-jobs-from-job-store%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown