20 lines
548 B
Python
20 lines
548 B
Python
from ..mautic import MauticHelper
|
|
from django_cron import CronJobBase, Schedule
|
|
import datetime
|
|
|
|
|
|
class MyCronJob(CronJobBase):
|
|
print(datetime.datetime.now(), " *** START sync customers ")
|
|
RUN_EVERY_MINS = 60
|
|
|
|
schedule = Schedule(run_every_mins=RUN_EVERY_MINS)
|
|
code = 'aitrainer_backoffice.controlling.cron' # a unique code
|
|
print(datetime.datetime.now(), " *** END sync customers ")
|
|
|
|
def do(self):
|
|
sync_customers() # do your thing here
|
|
|
|
|
|
def sync_customers():
|
|
helper = MauticHelper()
|
|
helper.syncTrial() |