Files
tryton/bin/trytond-cron
T
Cédric Krier 8a4ba59b2d Switch to WSGI API
issue4646
review20541003
2016-03-15 16:57:26 +01:00

26 lines
707 B
Python
Executable File

#!/usr/bin/env python
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import sys
import os
import time
DIR = os.path.abspath(os.path.normpath(os.path.join(__file__,
'..', '..', 'trytond')))
if os.path.isdir(DIR):
sys.path.insert(0, os.path.dirname(DIR))
import trytond.commandline as commandline
from trytond.config import config
import trytond.cron as cron
parser = commandline.get_parser_daemon()
options = parser.parse_args()
config.update_etc(options.configfile)
commandline.config_log(options)
with commandline.pidfile(options):
while True:
cron.run(options)
time.sleep(60)