Best Python code snippet using localstack_python
time_start2.py
Source:time_start2.py
...130 # æ¯å¦æ¯å
¬å¸ 产å131 t_ape = "1"132 # cur_batch1 = ""133 batch11 = cur_batch()134 # scheduler.add_job(get_bs_asin_elf,)135 # scheduler.add_job(get_bs_asin_elf1, 'interval', minutes=4)136 # scheduler.add_job(get_bs_asin_elf2, 'interval', minutes=5)137 # scheduler.add_job(get_bs_asin_elf3, 'interval', minutes=6)138 type_obj = {139 'amazon.com': 'amazon_com',140 'amazon.ca': 'amazon_ca',141 'amazon.co.jp': 'amazon_jp',142 'amazon.co.uk': 'amazon_uk',143 'amazon.es': 'amazon_es',144 'amazon.de': 'amazon_de',145 'amazon.fr': 'amazon_fr',146 'amazon.it': 'amazon_it',147 'amazon.com.au': 'amazon_au',148 }149 #150 # for k ,v in type_obj.items():151 # scheduler.add_job(get_bs_asin_elf1, 'interval', minutes=8,args=[k])152 # scheduler.add_job(get_bs_asin_elf2, 'interval', minutes=9,args=[k])153 # scheduler.add_job(get_bs_asin_elf3, 'interval', minutes=10,args=[k])154 scheduler.add_job(tick, 'interval', minutes=10)155 # scheduler.add_job(tick1, 'interval', minutes=10)156 # scheduler.add_job(tick2, 'interval', minutes=30)157 # scheduler.add_job(tick3, 'interval', minutes=30)158 # scheduler.add_job(tick4, 'interval', minutes=30)159 # scheduler.add_job(tick5, 'interval', minutes=30)160 # scheduler.add_job(tick6, 'interval', minutes=30)161 # scheduler.add_job(tick7, 'interval', minutes=30)162 ############163 scheduler.add_job(tick8, 'interval', minutes=30)164 scheduler.add_job(tick9, 'interval', minutes=30)165 scheduler.add_job(tick10, 'interval', minutes=30)166 scheduler.add_job(tick11, 'interval', minutes=30)167 scheduler.add_job(tick12, 'interval', minutes=30)168 scheduler.add_job(tick13, 'interval', minutes=30)169 scheduler.add_job(tick14, 'interval', minutes=30)170 # scheduler.add_job(get_bs_asin_elf1, 'interval', minutes=4, args=['amazon.com'])171 # scheduler.add_job(get_bs_asin_elf2, 'interval', minutes=5, args=['amazon.com'])172 # scheduler.add_job(get_bs_asin_elf3, 'interval', minutes=6, args=['amazon.com'])173 #174 # scheduler.add_job(get_bs_asin_elf1, 'interval', minutes=4, args=['amazon.ca'])175 # scheduler.add_job(get_bs_asin_elf2, 'interval', minutes=5, args=['amazon.ca'])176 # scheduler.add_job(get_bs_asin_elf3, 'interval', minutes=6, args=['amazon.ca'])177 # scheduler.add_job(get_bs_asin_elf3, 'interval', minutes=2)178 # scheduler.add_job(tick, 'interval', seconds=5,misfire_grace_time=3600,max_instances=10)179 # print(a)180 # scheduler.add_job(tick, 'interval', minutes=2)181 # scheduler.add_job(tick, 'interval', days=1, start_date="2021-2-19 5:00:00")182 # scheduler.add_job(tick, 'cron' ,hour=11,minute=44)183 # scheduler.add_job(tick,'cron', hour='12-23', minute='00', second='00')184 # scheduler.add_job(tick,'cron', hour='0-6', minute='00', second='00')185 scheduler.start()186 # print("Press Ctrl + {0} to exit".format('Break' if os.name == 'nt' else 'C'))187 try:188 while True:189 time.sleep(5)190 print(f"sleep! - {datetime.now()}")191 except (KeyboardInterrupt, SystemExit):192 scheduler.shutdown()...
aps_config.py
Source:aps_config.py
...25 else:26 test_init()27def test_init():28 """æµè¯ç¯å¢"""29 scheduler.add_job(get_603_data.get_center_data, id='get_center_data', trigger='interval', minutes=6)30 scheduler.add_job(get_603_data.get_chanct_data, id='get_chanct_data',trigger='interval', minutes=3)31 scheduler.add_job(get_603_data.get_match_data, id='get_match_data', trigger='interval', minutes=4)32 scheduler.add_job(get_603_data.get_sms_sjjs_data, id='get_sms_sjjs_data', trigger='interval', minutes=5)33 scheduler.add_job(get_603_data.get_sms_load_data, id='get_sms_load_data', trigger='interval', minutes=5)34 scheduler.add_job(get_603_data.get_mms_sjjs_data, id='get_mms_sjjs_data', trigger='interval', minutes=5)35 scheduler.add_job(get_603_data.get_mms_load_data, id='get_mms_load_data', trigger='interval', minutes=5)36 scheduler.add_job(get_603_data.get_relate_rate_data, id='get_relate_rate_data', trigger='interval', minutes=7)37 scheduler.add_job(get_509_data.get_loading_rate_data, args=['10.41.18.69'] , id='get_loading_rate_data', trigger='interval', minutes=2)38 scheduler.add_job(get_509_data.get_hive_db_data, args=['10.41.18.69'], id='get_hive_db_data', trigger='interval', minutes=8)39 scheduler.add_job(get_509_data.get_hive_db_increment, id='get_hive_db_increment', trigger='interval', minutes=6)40 scheduler.add_job(get_509_data.get_loading_rate_increment, id='get_loading_rate_increment', trigger='interval', minutes=8)41 scheduler.add_job(get_509_data.get_row_flow, id='get_row_flow', trigger='interval', minutes=8)42 scheduler.add_job(get_ipsy_data.get_log_data, id='get_log_data', trigger='interval', minutes=10)43 scheduler.add_job(get_ipsy_data.get_history_log_data, id='get_history_log_data', trigger='date', run_date=now_datetime, args=['2021-01-01', '2021-03-01', '/opt/rzx_ipsy_data'])44 scheduler.add_job(get_ipsy_data.get_log_increment, id='get_log_increment', trigger='interval', minutes=8)45 scheduler.add_job(get_ipsy_data.get_disk_usage, id='get_disk_usage', trigger='interval', minutes=5)46 scheduler.add_job(get_ipsy_data.get_bc_data, id='get_bc_data', trigger='interval', minutes=5)47 scheduler.add_job(get_public_data.get_topo_ip, id='get_topo_ip', trigger='interval', minutes=1)48 scheduler.add_job(get_public_data.get_topo_ip_list, id='get_topo_ip_list', trigger='interval', hours=24)49def product_init():50 """ç产ç¯å¢"""51 # æ¯å°æ¶ï¼ä¸ä¸æµ®å¨120ç§åºé´å
ï¼è¿è¡'get_center_data' jitteræ¯å¨åæ°ï¼ç»æ¯æ¬¡è§¦åæ·»å ä¸ä¸ªéæºæµ®å¨ç§æ°,é¿å
åæ¶è¿è¡é ææå¡æ¥å µ52 scheduler.add_job(get_603_data.get_center_data, id='get_center_data', trigger='interval', hours=1, jitter=120)53 scheduler.add_job(get_603_data.get_chanct_data, id='get_chanct_data',trigger='interval', minutes=10)54 scheduler.add_job(get_603_data.get_match_data, id='get_match_data', trigger='interval', minutes=15)55 scheduler.add_job(get_603_data.get_sms_sjjs_data, id='get_sms_sjjs_data', trigger='interval', minutes=5)56 scheduler.add_job(get_603_data.get_sms_load_data, id='get_sms_load_data', trigger='interval', minutes=5)57 scheduler.add_job(get_603_data.get_mms_sjjs_data, id='get_mms_sjjs_data', trigger='interval', minutes=5)58 scheduler.add_job(get_603_data.get_mms_load_data, id='get_mms_load_data', trigger='interval', minutes=5)59 scheduler.add_job(get_603_data.get_relate_rate_data, id='get_relate_rate_data', trigger='interval', minutes=10)60 scheduler.add_job(get_509_data.get_loading_rate_data, args=['10.41.18.69'] , id='get_loading_rate_data', trigger='interval', minutes=2)61 scheduler.add_job(get_509_data.get_hive_db_data, args=['10.41.18.69'], id='get_hive_db_data', trigger='interval', minutes=10)62 scheduler.add_job(get_509_data.get_hive_db_increment, id='get_hive_db_increment', trigger='interval', minutes=60)63 scheduler.add_job(get_509_data.get_loading_rate_increment, id='get_loading_rate_increment', trigger='interval', minutes=5)64 scheduler.add_job(get_509_data.get_row_flow, id='get_row_flow', trigger='interval', minutes=8)65 scheduler.add_job(get_ipsy_data.get_log_data, id='get_log_data', trigger='interval', hours=24)66 scheduler.add_job(get_ipsy_data.get_history_log_data, id='get_history_log_data', trigger='date', run_date=now_datetime, args=['2021-01-01', '2021-03-01', '/opt/rzx_ipsy_data'])67 scheduler.add_job(get_ipsy_data.get_log_increment, id='get_log_increment', trigger='interval', hours=24)68 scheduler.add_job(get_ipsy_data.get_disk_usage, id='get_disk_usage', trigger='interval', minutes=60)69 scheduler.add_job(get_ipsy_data.get_bc_data, id='get_bc_data', trigger='cron', month='1-12', day='1', hour=0)70 scheduler.add_job(get_public_data.get_topo_ip, id='get_topo_ip', trigger='interval', minutes=1)...
schedule_program.py
Source:schedule_program.py
...12from check_oracle_alive import checkOracleAlive13from guanyuan_data_reflash import guan_card_reflash_dd14### å®æ¶è°åº¦ä»»å¡ï¼çæ§é¨åº15sched = BlockingScheduler()16#sched.add_job(monitor_peisong, 'interval', seconds=5)17### é¨åºé
é-å è´§æ
åµçæ§18# sched.add_job(monitor_peisong, 'cron',hour = '9')19## æ»é¨çæ§20## çæ§ éç 订åéå½æ¥æ¥å
¥çæ
åµ21sched.add_job(job_hderp_stkout_feima,'cron',hour='9')22### æ»é¨ éè¦æé23#sched.add_job(send_import_alert,'cron',hour='8,10,12,16,21')24### æ»é¨ å¸è½¯æ¥è¡¨ç¨æ·å¯ç æ´æ° å é¤ç¦»èç¨æ·25#sched.add_job(update_finereport_userpwd,'cron',hour='*/1')26## æ»é¨ Webæå¡çæ§27sched.add_job(WebServiceMonitor().checkService,'cron',hour='5-23', minute ='*/12')28## æ»é¨ æ¥å¿æå¡çæ§ LogServiceMonitor29sched.add_job(LogServiceMonitor().checkLog,'cron',hour='5-23', minute ='*/12')30## æ»é¨ æå¡å¨ç£çãDG æå¡çæ§ LogServiceMonitor31#sched.add_job(checkDiskAndDatabaseBak,'cron',hour='9,11,12,14,16,18,21')32## æ»é¨ ä¸æ§äººäºåæ¥æ¥å£å¼å¸¸çæ§33#sched.add_job(getZkRsJKInfo,'cron',hour='8,9,10,11,12,13,14,15,16,17,18')34## æ»é¨ å¨çº¿ççæ§ åéï¼ä¸æ§ãJPOSãå
«ä¹å¨çº¿35#sched.add_job(dailyonline_Monitor,'cron',hour='8,10,14,16,18')36## æ»é¨æ°æ®åºå¯ç¨æ§çæ§37sched.add_job(checkOracleAlive, 'cron', hour='7-22', minute ='*/10')38## è§è¿å¡çæ´æ° ç£å¯¼èå¤39sched.add_job(guan_card_reflash_dd, 'cron', hour='7-13', minute='4,34')...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!