diff --git a/mayan/apps/common/management/commands/purgeperiodictasks.py b/mayan/apps/common/management/commands/purgeperiodictasks.py new file mode 100644 index 0000000000..823d78c0f8 --- /dev/null +++ b/mayan/apps/common/management/commands/purgeperiodictasks.py @@ -0,0 +1,12 @@ +from __future__ import unicode_literals + +from django.core import management + +from djcelery.models import PeriodicTask + + +class Command(management.BaseCommand): + help = 'Removes all periodic tasks.' + + def handle(self, *args, **options): + PeriodicTask.objects.all().delete()