There really needs to be more information about what you have set up and what you're trying to accomplish.
I'm -guessing- that you have a scene set up that uses the virtual switch status change as a trigger, but is it off->on, on->off, or either?
What is the code? How do you know that it isn't running?
What, ultimately, is your end goal?