Python 在django芹菜中定制定期任务

Python 在django芹菜中定制定期任务,python,django,Python,Django,我读到了芹菜关于周期性任务的使用: # Import for custom tasks from __future__ import absolute_import, unicode_literals from celery import shared_task from celery import Celery from celery.schedules import crontab @periodic_task(run_every=crontab(minute="*/2")) def

我读到了芹菜关于周期性任务的使用:

# Import for custom tasks
from __future__ import absolute_import, unicode_literals
from celery import shared_task
from celery import Celery
from celery.schedules import crontab

@periodic_task(run_every=crontab(minute="*/2"))
  def print_mail():
    print("Send Mail to A Specific Time")
我想知道我是否可以通过表单输入更改尚未设置的时间(以分钟为单位),并且任务将在表单输入时定期运行,芹菜可以这样做吗?如何,谢谢你