Have a look at my Kobo Utilities plugin. I do that already. And there is code that triggers a job when the device is connected. And if you are considering what I think you are, it's something that could be added to the plugin. As Kovid always says, "Patches are welcome"