UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Mail Does Not Run When Computer Is Locked., Office 2013    
 
   
dflak
post Jan 11 2017, 08:42 AM
Post#1


Utter Access VIP
Posts: 6,004
Joined: 22-June 04
From: North Carolina


I am using office 365 (2013) at work where this is happening.

I have a program that looks at an Outlook mailbox, reads emails and puts them into a report. It works perfectly.

I know that I need to be logged into the workstation that runs the code. So I log in and do nothing else. I don't even lock the machine manually. I let it time out. Sometimes I do lock the machine manually, but it does not affect the outcome.

The code is kicked off by the task manager.

Every morning the report runs and completes without error but it reads no data from the mailbox. The sheet that is supposed to contain the emails has a single blank entry for Jan 1, 1900.

I unlock the computer (I am still logged in), go to the task manager, and run the task and the report completes, this time reading the mailbox properly.

The only difference between the runs is that it fails to read the mailbox when the computer is logged in and locked and runs the exact same code and reads the mailbox properly when the screen is unlocked. Our IT group sets the registry to lock machines after 15 minutes of activity. So unless I get in at 5 AM to unlock the machine, the report isn't going to run.

FYI: when the code runs, it runs "silently" it does not display anything on the screen.

What is even more confusing is that there is a second report also kicked off by the task manager with very similar code that runs whether the machine is locked or not.

My most recent attempt to get the malfunctioning code to run was to go to properties on the task manager and check on "Wake machine to run program."

--------------------
Dan

One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.
Please zip and attach samples. It makes life easier for those who have to figure out what you are trying to do. Thanks
Go to the top of the page
 
Doug Steele
post Jan 11 2017, 09:48 AM
Post#2


UtterAccess VIP
Posts: 21,439
Joined: 8-January 07
From: St. Catharines, ON (Canada)


Sorry if it's an obvious question, but is the scheduled task running under the correct credentials? AFAIK, you manually running the task through Task Manager will use your credentials, whereas if Task Manager runs the job automatically, it'll use whatever credentials were set for the job.

--------------------
Go to the top of the page
 
dflak
post Jan 11 2017, 10:07 AM
Post#3


Utter Access VIP
Posts: 6,004
Joined: 22-June 04
From: North Carolina


I have the task manager set up to run only when I am logged in. Credentials to run applications are not needed in this case.

We are using Outlook 365 (2013) - I've opened Outlook on the machine and can see the mailbox, so I know the credentials to Outlook work properly.

I found that I had to be logged in for the interface to Outlook to work. Just having Outlook installed isn't good enough. However, Outlook does not have to be running for the code in either of the programs to work. I've left Outlook running and it does not affect the outcome.

BTW: I'm running the application through Excel.

P.S. No question is too obvious smile.gif

--------------------
Dan

One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.
Please zip and attach samples. It makes life easier for those who have to figure out what you are trying to do. Thanks
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    19th November 2017 - 03:47 AM