service.py 488 B

123456789101112131415161718192021
  1. from comar.service import *
  2. serviceType = "local"
  3. serviceDesc = _({"en": "Cron Task Scheduler",
  4. "tr": "Cron Görev Zamanlayıcı"})
  5. serviceDefault = "on"
  6. @synchronized
  7. def start():
  8. startService(command="/usr/sbin/cron",
  9. pidfile="/var/run/cron.pid",
  10. donotify=True)
  11. @synchronized
  12. def stop():
  13. stopService(pidfile="/var/run/cron.pid",
  14. donotify=True)
  15. def status():
  16. return isServiceRunning("/var/run/cron.pid")