apscheduler.jobstores.mongodb

API

class apscheduler.jobstores.mongodb.MongoDBJobStore(database='apscheduler', collection='jobs', client=None, pickle_protocol=pickle.HIGHEST_PROTOCOL, **connect_args)

Bases: BaseJobStore

Stores jobs in a MongoDB database. Any leftover keyword arguments are directly passed to pymongo’s MongoClient.

Plugin alias: mongodb

Parameters:
  • database (str) – database to store jobs in

  • collection (str) – collection to store jobs in

  • client – a MongoClient instance to use instead of providing connection arguments

  • pickle_protocol (int) – pickle protocol level to use (for serialization), defaults to the highest available

Introduction

MongoDBJobStore stores jobs in a MongoDB database.

External dependencies

pymongo

Example

examples/jobstores/mongodb.py (view online).