-
Notifications
You must be signed in to change notification settings - Fork 8
/
maps_jobs.py
40 lines (31 loc) · 1.16 KB
/
maps_jobs.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
from apscheduler.schedulers.blocking import BlockingScheduler
from apscheduler.schedulers.background import BackgroundScheduler
import logging
import psycopg2
from UnoCPI import settings
import os
import Project_GEOJSON, Partner_GEOJSON, City_GEOJSON
# sched = BlockingScheduler()
# sched1 = BackgroundScheduler()
# Initializing the sql files
logger = logging.getLogger("UNO CPI Application Create MAPS json Batch job")
#
# @sched.scheduled_job('cron', day_of_week='mon-sun', hour=1)
def main():
print('This job is ran every day at 1:30 AM CST/ 12:30 AM CDT.')
project = 'python Project_GEOJSON.py'
partner = 'python Partner_GEOJSON.py'
city = 'python City_GEOJSON.py'
logger.info("Start create project json")
print("Start create project geo json script")
os.system(project)
print("End create project geo json script")
logger.info("Start create partner json")
print("Start create partner geo json script")
os.system(partner)
print("End create partner geo json script")
logger.info("Start create city json")
print("Start create city geo json script")
os.system(city)
print("End create city geo json script")
main()