Well to sum it up: you can, by setting your script to autorun at power-on and program the script to power-off, but only if
1) your camera powers up automatically when you connect the USB cable (you need to test this yourself, some models do, some don't, my a570is doesn't).
and
2) you make/buy/whatever an external timer which wakes up the camera periodically by enabling USB supply voltage. If you aren't keen on electronics design, you can use off the shelf electronics to supply 5V to an USB cable (or if you can't manage that, even a complete gadget which provides an USB port; for example I have an externally powered USB hub which seems to supply 5V to it's output ports even if the hub isn't actually connected to a computer) and power it up periodically with a cheap analog or digital mains supply timer.