def bob_job(): me, password = email_login() sched = BlockingScheduler() @sched.scheduled_job('cron', day_of_week='mon,tue,wed,thu,fri', hour=17) def scheduled_job(): job.run(me, password) sched.start()
ls_bbd.append(round(bollinger_band, 3)) df = pandas.DataFrame({ 'ETF': ls_etf, 'Relative Strength': ls_rsi, 'Bollinger Band': ls_bbd }) df.set_index('ETF').to_csv(filename) def run(me, password): find_validETF('ETF.csv') send_mail(send_from='*****@*****.**', send_to=SUBSCRIBE_LIST, subject='Suggested ETF', text="""Hello, Attachment includes the ETFs with today's close lower than Bollinger Bottom and Relative Strength Index lower than 30. Sincerely, -Weiyi """, files=['ETF.csv'], server='smtp.gmail.com', username=me, password=password) if __name__ == '__main__': me, password = email_login() run(me, password)
ls_bbd.append(round(bollinger_band,3)) df = pandas.DataFrame({ 'ETF': ls_etf, 'Relative Strength': ls_rsi, 'Bollinger Band': ls_bbd }) df.set_index('ETF').to_csv(filename) def run(me, password): find_validETF('ETF.csv') send_mail( send_from = '*****@*****.**', send_to = SUBSCRIBE_LIST, subject = 'Suggested ETF', text = """Hello, Attachment includes the ETFs with today's close lower than Bollinger Bottom and Relative Strength Index lower than 30. Sincerely, -Weiyi """, files = ['ETF.csv'], server = 'smtp.gmail.com', username = me, password = password ) if __name__ == '__main__': me, password = email_login() run(me, password)