3

I have an SSIS package which reads csv files present in a folder and uploads the data into a database. It also has a send mail component which is used to send mails after the csv file is read and data is uploaded. This package is called programmatically from a C# console application. In the console app the package is called one time for each file present in the folder. This console app is scheduled to run daily at a specific time through the Windows Task Scheduler.

The problem I am facing is that when I directly double click on the console app's exe and run it, the data is getting uploaded successfully and the mails are also being sent. But when the same console app's exe is called from the Task Scheduler the data from the csv file is getting uploaded successfully but the mails are not being sent (mail functionality is not working in case of scheduler)

What could be the problem?

von v.
  • 16,868
  • 4
  • 60
  • 84
seadrag0n
  • 848
  • 1
  • 16
  • 40
  • This seems backwards in that a console app shouldn't be calling an SSIS package through Windows Task Scheduler. Rather, the SSIS package should be scheduled through the SSIS Agent. SSIS has built-in tools for iterating a collection of files as well. – Metro Smurf Mar 21 '13 at 16:15
  • @MetroSmurf i am calling SSIS package through console app because i have to pass values to ssis package variables dynamically based on some conditions from the console app and i am sure this can be done from SSIS itself but i am new to ssis – seadrag0n Mar 22 '13 at 06:36

1 Answers1

1

The most likely cause is a permissions issue; the account under which the console app runs doesn't have permission to send email while your account does. Are there any error logs, Windows Event Log entries, etc. generated by the console app?

Edmund Schweppe
  • 4,992
  • 1
  • 20
  • 26
  • it shows that it is running under same account but i have to click on "show processes from all users" to see the console app process... also i am logging any exceptions that occurs when the console app runs which will also log errors thrown by the package and i am not getting any errors... – seadrag0n Mar 22 '13 at 06:39