@click.command(u'enable-scheduler')
@pass_context
def enable_scheduler(context):
 import frappe.utils.scheduler
 for site in context.sites:
  try:
   frappe.init(site=site)
   frappe.connect()
   frappe.utils.scheduler.enable_scheduler()
   frappe.db.commit()
   print u'Enabled for', site
  finally:
   frappe.destroy()

@ click . command ( u'enable-scheduler' ) @ pass_context def enable_scheduler ( context ) : import frappe . utils . scheduler for site in context . sites : try : frappe . init ( site = site ) frappe . connect ( ) frappe . utils . scheduler . enable_scheduler ( ) frappe . db . commit ( ) print u'Enabled for' , site finally : frappe . destroy ( )
enable scheduler .