@click.command(u'trigger-scheduler-event')
@click.argument(u'event')
@pass_context
def trigger_scheduler_event(context, event):
 import frappe.utils.scheduler
 for site in context.sites:
  try:
   frappe.init(site=site)
   frappe.connect()
   frappe.utils.scheduler.trigger(site, event, now=True)
  finally:
   frappe.destroy()

@ click . command ( u'trigger-scheduler-event' ) @ click . argument ( u'event' ) @ pass_context def trigger_scheduler_event ( context , event ) : import frappe . utils . scheduler for site in context . sites : try : frappe . init ( site = site ) frappe . connect ( ) frappe . utils . scheduler . trigger ( site , event , now = True ) finally : frappe . destroy ( )
trigger a scheduler event .