George Perolli
asked on
Windows 10 Scheduled Tasks
I have written a console program that scans an Exchange Public Folder Calendar for appointments. If there are appointments within a given period of time, then it creates an email with the subject of the appointment and sends it to me.
On a Windows 8.1 machine when I run the program from a command prompt or if I create a scheduled task and run the task, the application works perfectly
On a Windows 10 machine when I run the program from a command prompt it work perfectly. If I create a scheduled task and run the task the application fails.
In both cases I use the exact same configuration on the scheduled task and yet on the Windows 10 it does not work.
On a Windows 8.1 machine when I run the program from a command prompt or if I create a scheduled task and run the task, the application works perfectly
On a Windows 10 machine when I run the program from a command prompt it work perfectly. If I create a scheduled task and run the task the application fails.
In both cases I use the exact same configuration on the scheduled task and yet on the Windows 10 it does not work.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
you will need to add tracing and error logging to your application to find out where and the exception raised when your app is running from the scheduler.
I have many applications running from schedulers without issues. There is something else.
I have many applications running from schedulers without issues. There is something else.
ASKER
In my application I am using Outlook to be able to access Exchange. Here is some of my code:
Dim objOutlook as Microsoft.Office.Intrerop. Outlook.Ap plication <-- This line runs properly
objOutlook = New Microsoft.Office.Interop.O utlook.App lication() <-- Program hangs on this line
I do not have the error that is thrown. I modified my code to write to a text file after each line of code gets executed so I know what is causing the problem. I will now get it to catch the error.
Dim objOutlook as Microsoft.Office.Intrerop.
objOutlook = New Microsoft.Office.Interop.O
I do not have the error that is thrown. I modified my code to write to a text file after each line of code gets executed so I know what is causing the problem. I will now get it to catch the error.
Have you tried setting "Run with highest privileges"? and "run whether user is logged on or not"?
ASKER
Yes I have.
can you post a screen shot of your tasks settings here please?
ASKER
I do not want to add the Calendar to Outlook because I want the calendar to out live the user. If the user leaves the company who will get the notifications? Yes you can move the calendar to someone else, but if you forget then renewals will be missed.
With my app the notifications can be sent to a distribution list and therefore not user specific.
With my app the notifications can be sent to a distribution list and therefore not user specific.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Eric suggested that I find what the exact error that was being thrown. With the exact error I was able to find an article that led me to solving my own problem. I posted the solution that I found so that other people with the same problem have a solution.
ASKER