I have a VBScript that loops through all inbox items and makes database entries based on the contents of those emails.
I can run it from the command prompt or double-click the VBS file and it runs fine. However, when I try to run this VBS with Task Scheduler, it doesn't do much of anything.
I can see that wscript.exe is running with the correct user, along with OUTLOOK.EXE in Task Manager, but it never actually executes the code in the VBS.
The task runs forever unless I end it, at which point the wscript and outlook executables exit.
I've tried running Outlook, then launching the task and a second outlook executable opens under the logged-in user (different from the email account) but it's clear there's no action being taken by the VBScript.
I've tried using cscript to generate output and error txt files but both are blank...
Does anyone have any tips on determining what's going on here?
Ultimately I need this script to run every hour with no one logged on.
UPDATE This is working perfectly using Redemption RDO object instead of Outlook.Application object. Thank you so much!