10 thoughts on “Python scheduling

  1. Thanks for the Video. I have a question I want to schedule my home automation system. I am using Raspberry pi 3 with 8 channel Relay. I want to achieve that
    I want Relay 1 to turn On at 00:00:00 for 1 hour and then again at 04:00:00 for one hour (I mean every 4 hour).
    Please tell me how i will do that?

  2. just in case anyone is using Python >= 3 you'll have to make a few changes with urllib and requests in the "job" function.

    def job():
    # product "Sony 55inch"
    url = "http://www.bestbuy.com/site/sony-55-class-54-6-diag–led-2160p-smart-4k-ultra-hd-tv-with-high-dynamic-range-black/4804403.p?skuId=4804403"
    with urllib.request.urlopen(url) as response:
    html = response.read()
    regex = '<meta id="schemaorg-offer-price" itemprop="price" content=(.+?)>'
    pattern = re.compile(regex)
    price5 = pattern.findall(response.read().decode('utf-8'))
    print( "Sony 55inch",price5,str(datetime.now()))

Leave a Reply

Your email address will not be published. Required fields are marked *