update cron job

This commit is contained in:
MuslemRahimi 2024-08-28 10:33:34 +02:00
parent 904a8857ec
commit ab4b8b744a
2 changed files with 5 additions and 3 deletions

View File

@ -135,12 +135,13 @@ async def get_upcoming_earnings(session):
'revenueEst': revenue_est
})
except Exception as e:
print('1 Upcoming Earnings:', e)
print('Upcoming Earnings:', e)
pass
res_list = remove_duplicates(res_list)
res_list.sort(key=lambda x: x['marketCap'], reverse=True)
res_list = [{k: v for k, v in d.items() if k != 'marketCap'} for d in res_list]
except Exception as e:
print(e)
pass
return res_list[0:5]
@ -227,7 +228,7 @@ async def get_recent_dividends(session):
'updated': item['updated']
})
except Exception as e:
print('Recent Earnings:', e)
print('Recent Dividends:', e)
pass
except Exception as e:
print(e)

View File

@ -580,7 +580,6 @@ schedule.every().saturday.at("05:00").do(run_threaded, run_ownership_stats).tag(
schedule.every(1).minutes.do(run_threaded, run_cron_portfolio).tag('portfolio_job')
schedule.every(5).minutes.do(run_threaded, run_cron_market_movers).tag('market_movers_job')
schedule.every(2).minutes.do(run_threaded, run_dashboard).tag('dashboard_job')
schedule.every(30).minutes.do(run_threaded, run_dividend_list).tag('dividend_list_job')
schedule.every(15).minutes.do(run_threaded, run_cron_market_news).tag('market_news_job')
@ -604,6 +603,8 @@ schedule.every(6).hours.do(run_threaded, run_analyst_rating).tag('analyst_job')
schedule.every(10).seconds.do(run_threaded, run_if_not_running(run_cron_options_flow, 'options_flow_job')).tag('options_flow_job')
schedule.every(10).seconds.do(run_threaded, run_if_not_running(run_cron_options_zero_dte, 'options_zero_dte_job')).tag('options_zero_dte_job')
schedule.every(2).minutes.do(run_threaded, run_dashboard).tag('dashboard_job')
# Run the scheduled jobs indefinitelyp
while True: