APScheduler on Pthon 3.5 - Error getting due jobs from job store









up vote
0
down vote

favorite












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()









share|improve this question

























    up vote
    0
    down vote

    favorite












    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()









    share|improve this question























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      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()









      share|improve this question













      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






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 12 at 0:07









      Nathan Weiler

      93




      93



























          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',
          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
          );



          );













          draft saved

          draft discarded


















          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






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          draft saved

          draft discarded
















































          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.




          draft saved


          draft discarded














          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





















































          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







          Popular posts from this blog

          Top Tejano songwriter Luis Silva dead of heart attack at 64

          政党

          天津地下鉄3号線