cron.py 347 B

12345678910111213141516171819202122
  1. # -*- coding: utf-8 -*-
  2. """
  3. demeter web
  4. name:admin.py
  5. author:rabin
  6. """
  7. from demeter.core import *
  8. param = {}
  9. param['method'] = 'm'
  10. Demeter.getopt(param)
  11. Demeter.echo(Demeter.option['method'])
  12. method = Demeter.option['method']
  13. cron = Demeter.service(method, 'cron')
  14. if 'mqtt_' in method:
  15. cron.run()
  16. else:
  17. while(True):
  18. cron.run()