# -*- coding: utf-8 -*- #!/usr/bin/env python import os, sys import threading import uuid import xlrd from xlrd import xldate_as_tuple import simplejson as json import datetime from django.conf import settings from bson import ObjectId PROJECT_ROOT = os.path.join(os.path.abspath(os.path.split(os.path.realpath(__file__))[0] + "/.."), '..') sys.path.insert(0, PROJECT_ROOT) os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'configs.production') from script.base import init_env init_env(interactive = False) from apps.web.device.models import SIMCard,Device from apps.web.dealer.models import Dealer from apps.web.constant import Const from apilib.utils_datetime import to_datetime from apps.web.user.models import RechargeRecord from apps.web.dealer.tasks import dealer_auto_charge_sim_card dealer_auto_charge_sim_card() print 'ok'