Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Wake Heroku Dynos - Python

from datetime import datetime,timedelta
import requests
from time import sleep

def restart():
while True:
try:
v=(datetime.utcnow()+timedelta(hours=5,minutes=30))
if(5*60 requests.head("http://subdomain.herokuapp.com/up/pys",timeout=5)
sleep(25*60)
except Exception as e:
sleep(60)
continue


This post first appeared on SMARTMANOJ, please read the originial post: here

Share the post

Wake Heroku Dynos - Python

×

Subscribe to Smartmanoj

Get updates delivered right to your inbox!

Thank you for your subscription

×