#!/usr/bin/env python
# -*- coding: utf-8 -*-
from apscheduler.schedulers.blocking import BlockingScheduler


class JobRunner(object):

    def __init__(self, scheduler):
        self.scheduler = scheduler
        self.add_ping('https://groceries-api.herokuapp.com/status')
        self.add_ping('https://challenge-backend.herokuapp.com/ping')
        self.scheduler.start()

    def add_ping(self, url):
        self.scheduler.add_job(
            self._ping(url),
            trigger='cron',
            minute='*/5',
            hour='7-22')

    def _ping(self, url):
        def handler():
            print('Pinging {}'.format(url))
        return handler


if __name__ == '__main__':
    JobRunner(BlockingScheduler())

@@ -39,16 +39,33 @@
 f-8 -*-%0A
+import requests%0A%0A
 from aps
@@ -621,39 +621,25 @@
     
-print('Pinging %7B%7D'.forma
+requests.ge
 t(url)
-)
 %0A   

use requests to ping endpoints