Esempio n. 1
0
def run_scheduler():
	from webnotes.utils.file_lock import create_lock, delete_lock
	import webnotes.utils.scheduler
	if create_lock('scheduler'):
		webnotes.connect()
		print webnotes.utils.scheduler.execute()
		delete_lock('scheduler')
	webnotes.destroy()
Esempio n. 2
0
def run_scheduler(site=None):
	from webnotes.utils.file_lock import create_lock, delete_lock
	import webnotes.utils.scheduler
	webnotes.init(site=site)
	if create_lock('scheduler'):
		webnotes.connect(site=site)
		print webnotes.utils.scheduler.execute()
		delete_lock('scheduler')
	webnotes.destroy()
Esempio n. 3
0
def run_scheduler(site=None):
    from webnotes.utils.file_lock import create_lock, delete_lock
    import webnotes.utils.scheduler
    webnotes.init(site=site)
    if create_lock('scheduler'):
        webnotes.connect(site=site)
        print webnotes.utils.scheduler.execute()
        delete_lock('scheduler')
    webnotes.destroy()