I’ve got a python script that uploads all files (backup snapshot files) to Azure blob storage. I’ve created an automation that takes backup every week.
I’m using Appdaemon for my python script but don’t understand how to trigger it. I want to trigger the script each night.
Found this but not sure if it will work … this runs every 10 minute
self.run_every(self.run_every_c, "now", 10 * 60)
Is there a better way of doing this?
Got it to work, see some code blow
import appdaemon.plugins.hass.hassapi as hass
import datetime
class AzureStorage(hass.Hass):
def initialize(self):
time = datetime.time(15, 52, 0)
self.log("initialize AzureStorage script")
self.run_daily(self.run_daily_callback, time)
def run_daily_callback(self, kwargs):
self.log("starting backup")