Do you mean that you want your Z to automatically run a particular script every time you insert an SD card?
I think it would slow your Z down a lot because, from what I know, you'd have to write a script to run as a cron or at job every so often that respawned another one at a specified interval. Maybe somebody has some better ideas. The other thing to do I guess would be to write a script that looped infinitely, including a sleep, and if it detected the SD card, have it call your script, and then have it loop until you eject the card and then start over looking for another insertion.
Why not just run the script from the command line after you insert the card?
sdjf