use ip royal proxy to validate links
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
from apscheduler.executors.pool import ThreadPoolExecutor, ProcessPoolExecutor
|
||||
from apscheduler.schedulers.blocking import BlockingScheduler
|
||||
|
||||
from link_validator_executor import start_link_validation
|
||||
|
||||
|
||||
def start_check_results_job(sched):
|
||||
sched.add_job(start_link_validation, 'cron', day_of_week='mon-sat', hour='13',
|
||||
minute='48',
|
||||
misfire_grace_time=10,
|
||||
second='10', timezone='Europe/Paris', max_instances=1, args=[])
|
||||
|
||||
|
||||
def config_and_start_jobs():
|
||||
executors = {
|
||||
'default': ThreadPoolExecutor(1),
|
||||
'processpool': ProcessPoolExecutor(1)
|
||||
}
|
||||
sched = BlockingScheduler(executors=executors)
|
||||
start_check_results_job(sched)
|
||||
sched.print_jobs()
|
||||
sched.start()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
config_and_start_jobs()
|
||||
Reference in New Issue
Block a user