Skip to main content

A Celery Beat Scheduler that uses MongoDB to store both schedule definitions and status information

Project description

celerybeat-mongo
################

This is a Celery Beat Scheduler (http://celery.readthedocs.org/en/latest/userguide/periodic-tasks.html)
that stores both the schedules themselves and their status
information in a backend Mongo database. It can be installed by
installing the celerybeat-mongo Python egg::

# pip install celerybeat-mongo

And specifying the scheduler when running Celery Beat, e.g.::

$ celery beat -S celerybeatmongo.schedulers.MongoScheduler

Settings for the scheduler are defined in your celery configuration file
similar to how other aspects of Celery are configured::

Schedules can be manipulated in the Mongo database using the
mongoengine models in celerybeatmongo.models or through
direct database manipulation. There exist two types of schedules,
interval and crontab::

{
"_id" : ObjectId("533c5b29b45a2092bffceb13"),
"name" : "interval test schedule",
"task" : "task-name-goes-here",
"enabled" : true,
"interval" : {
"every" : 5,
"period" : "minutes"
},
"args": ["param1", "param2"]
"kwargs" : {
"max_targets" : 100
},
"total_run_count" : 5
"last_run_at" : ISODate("2014-04-03T02:19:22.666Z"),
}

{
"_id" : ObjectId("533c5b29b45a2092bffceb13"),
"name" : "crontab test schedule",
"task" : "task-name-goes-here",
"enabled" : true,
"crontab" : {
"minute": "30",
"hour": "2",
"day_of_week": "*",
"day_of_month": "*",
"day_of_year": "*",
},
"args": ["param1", "param2"]
"kwargs" : {
"max_targets" : 100
},
"total_run_count" : 5
"last_run_at" : ISODate("2014-04-03T02:19:22.666Z"),
}


The following fields are required: name, task, crontab || interval,
enabled when defining new tasks.
total_run_count and last_run_at are maintained by the
scheduler and should not be externally manipulated.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

celerybeat-mongo-0.0.0.tar.gz (3.6 kB view details)

Uploaded Source

File details

Details for the file celerybeat-mongo-0.0.0.tar.gz.

File metadata

File hashes

Hashes for celerybeat-mongo-0.0.0.tar.gz
Algorithm Hash digest
SHA256 fcfce1b5b64e5e4c4bac04112d7f8718dc2207480ada287012f7e419646151b8
MD5 0bd9dc3ce6d594ad30bf0a81d9f70bda
BLAKE2b-256 096ac8ded65ae6a80f73e691a2eb66b1a3ea938b8200ffad09e9592ef65843b5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page