Generic cron task for running instances of django models
What’s that?
Is a library that you can use to attach programmed executions of a method in the instances of any model in your django applications.
How to use
Install djmodelcron and django-recurrence.
You need to add a generic relation to the cron model of the djmodelcron app.
Using it
INSTALLED_APPS = (
...
'djmodelcron',
'recurrence',
)
# In your models.py
from djmodelcron.models import Cron
class MyModel(models.Model):
title = models.CharField(max_length=125)
cron = generic.GenericRelation(Cron)
def run(self):
print "This is call every time associated cron is executed"
Metadata
Release files for djmodelcron 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| djmodelcron-0.1.0.tar.gz | 3.4 kB | Details |
Release files / djmodelcron-0.1.0.tar.gz
| Download URL | djmodelcron-0.1.0.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3f05bbae33717029769284f9def93644e67edf1e58b3645afa84b11fba3d4667
|
|
BLAKE2b-256 checksum How to use checksums |
32750d3a909c748390dafb1c66515e0e758797e517e350ac08f40268888824b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |