HELP - schedule VB .NET app in Scheduled Tasks

  • Thread starter Thread starter Nick
  • Start date Start date
N

Nick

Hi

I have created a VB .NET application which emails all staff in the
office. I would like it to run every morning at 8am. I thought that the
best way to schedule this would be through Windows Task Scheduler as I
have to start it up manually at the moment.

The program starts up fine at 8am, but it will not send out any emails.
It writes an entry to the log which has been created in the SQL Server
2000 database to say that it has commenced, but it does not send any
of the emails to any of the recipients.

At first I thought it may be encountering an error. So I have
encapsulated all code in a try-catch statement and write any of the
errors that are caught to the database, but no errors are written,
hence I presume no errors are written.

Also, when the application is started I cannot visually see it running.

Can someone please help ????

I am running the app under terminal services and I have all the correct
privelidges set. The program runs fine when I double-click the icon off
the desktop, but it won't send email through the task scheduler.

Thank you in advance.

Nick
 
Hi Nick,

Task Scheduler is a service so any programs it starts will run under the context of the service which is why you see no user interface. The reason that your program never sends any emails is probably to do with permissions as by default, this service is set up to run under the machine's LocalSystem account which will not have have any privileges outside of the local machine.

An option would be to reconfigure the Task Scheduler service to run under the context of a network account that has the required network privileges.

HTH,
Gary
 
Back
Top