from django.shortcuts import render

# Create your views here.
import time
from apscheduler.schedulers.background import BackgroundScheduler
from django_apscheduler.jobstores import DjangoJobStore
from Ansjer.config import LOGGER


def auto_hello():
    now_time = time.time()
    print('hello world:[{}]'.format(now_time))


scheduler = BackgroundScheduler()
scheduler.add_jobstore(DjangoJobStore(), 'default')

scheduler.add_job(auto_hello, 'cron', day='*', hour=15, minute=30, replace_existing=True, id='test_job')
scheduler.start()
