Run weather app using crontab

Is it possible using crontab to run the weather first thing in the morning? I know you can set the weather app as the startup on a reboot, but I am talking about programming crontab to turn on the monitor at 6am and display the weather app without having to reboot the system. Any help would be appreciated.

I would think something like this should bring up the window…

kodi-send -a "activatewindow(weather)"

If your using CEC this should wake the TV and switch to the correct input…

kodi-send -a "CECActivateSource"

Thanks the- kodi-send -a “activatewindow(weather)” worked perfectly in crontab

I should have added that using the “activatewindow” action can have issues depending of what is currently on the screen when it is called. The command will do nothing when some dialog boxes are on the screen such as the My OSMC update available notice. It will also temporarily break the Plex add-on if used when it’s open. There is also a few Windows where the command can crash Kodi although I don’t remember what they are off the top of my head. I’m not saying this to discourage you from using this action. I just want to point this out so if you on occasion get an unexpected result when it activates then it is probably an issue of what was on the screen prior to. If an issue comes up for some reason you could probably mitigate this by sending a “back” action prior to the activatewindow action.

Understood, I will see if it has any issues when it runs in the morning. Thanks again

1 Like