I appreciate your suggestion to look into the machine but since the problem is apparently not related to the machine as such I have little hope here. The difference in performance is observed on a single virtualized machine in both cases.
I am using the virtual machine and log onto it by remote desktop. Performance for the script is fine when started from the console. The same script on the very same machine (me still logged on) is extremely slow when running scheduled. I have full admin rights on the machine and there is no indication that resources are utilized in a noticeable way when the problem occurs.