13 lines
338 B
Python
13 lines
338 B
Python
|
from django_celery_beat.models import PeriodicTask, IntervalSchedule
|
||
|
|
||
|
def setup_cron():
|
||
|
schedule, created = IntervalSchedule.objects.get_or_create(
|
||
|
every=1,
|
||
|
period=IntervalSchedule.MINUTES,
|
||
|
)
|
||
|
|
||
|
PeriodicTask.objects.get_or_create(
|
||
|
interval=schedule,
|
||
|
name='Expephacron',
|
||
|
task='cron',
|
||
|
)
|