コード例 #1
0
ファイル: run_daemon.py プロジェクト: wqqsukida/auto_client
    def run(self, output_fn, **kwargs):
        fd = open(output_fn, 'w')
        while True:
            BASEDIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
            sys.path.append(BASEDIR)
            os.environ['AUTO_CLIENT_SETTINGS'] = "conf.settings"
            from src import script

            script.start()
            line = time.ctime() + '\n'
            fd.write(line)
            fd.flush()
            time.sleep(60)
        fd.close()
コード例 #2
0
# -*- coding: UTF-8 -*-

import sys
import os
import time
BASEDIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(BASEDIR)
os.environ['AUTO_CLIENT_SETTINGS'] = "conf.settings"
from src import script

if __name__ == '__main__':
    while True:
        script.start()
        time.sleep(60)
コード例 #3
0
ファイル: run.py プロジェクト: wang935415150/omdbs5
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# __author__ = "wyd"
# Date: 2017/9/25

import sys
import os
BASEDIR = os.path.dirname(os.path.abspath(__file__))
sys.path.append(BASEDIR)
os.environ['AUTO_CLIENT_SETTINGS'] = "conf.settings"

from src import script
if __name__ == "__main__":
    obj = script.start()