13 lines
369 B
Python
13 lines
369 B
Python
# coding: utf-8
|
|
from apscheduler.schedulers.background import BlockingScheduler
|
|
from main import main as rutina_principal
|
|
import logging
|
|
|
|
sched = BlockingScheduler()
|
|
sched.add_job(rutina_principal, 'interval', seconds=int(os.environ.get('INTERVAL'))) #will do the print_t work for every 30 seconds
|
|
|
|
|
|
if __name__ == '__main__':
|
|
init_db(db, engine)
|
|
sched.start()
|