I have db example:
Emp_Name Salary Date
------------- -------- -----------
Raj 2000 1-05-2014
Pavan 3000 1-07-2014
kumar 1000 1-07-2014
---------------------------------------------------
suppose today date- 1-072014
i want to send Email to my admin [email protected] at 7pm daily automatically of today transaction like...
Emp_Name Salary Date
------------- -------- -----------
Pavan 3000 1-07-2014
kumar 1000 1-07-2014
---------------------------------------------------
Total- 4000
-------------------------------------------------
Please give me some suggestion or code for trigger in ms sql server that i am able to send Emaill automatically 7 pm Daily.
Please help me!


Guest UserRank #259 · 9.8K reputationPosted Jul 12, 2014, 6:38 PM EDT
I suggest you to explore https://www.setcronjob.com/ in such case.
So, you can schedule your .Net code to run @7pm which will send Email
Let me know if this is useful!
twitter @sumitjolly
Guest UserRank #259 · 9.8K reputationPosted Jul 9, 2014, 5:18 AM EDT
# Use SQLServer Agent and schedule job which runs at 7pm daily and send email
# Use Windows Scheduler and write C# code to send email
# In SQLServer you can write trigger at any DML operation and send email
twitter @sumitjolly
Harshal ThakreRank #9,158 · 210 reputationPosted Jul 10, 2014, 2:10 AM EDT
Harshal ThakreRank #9,158 · 210 reputationPosted Jul 22, 2014, 2:33 AM EDT
Harshal ThakreRank #9,158 · 210 reputationPosted Jul 22, 2014, 2:33 AM EDT
Guest UserRank #259 · 9.8K reputationPosted Jul 22, 2014, 4:06 AM EDT
If doesn't suit you look for similar alternatives...
twitter @sumitjolly
Harshal ThakreRank #9,158 · 210 reputationPosted Jul 23, 2014, 5:17 AM EDT
In Global.asax:
Guest UserRank #259 · 9.8K reputationPosted Jul 23, 2014, 5:49 AM EDT
The other way to achieve this on similar lines is
# create a html page
# put SetTimeOut() function in JS and check for time say "19:00" to call .Net code
# and use AJAX to call .Net email sending code
The disadvantage of this html page approach is you need to have this file open at browser always.
I vote for your approach.
twitter @sumitjolly
Guest UserRank #259 · 9.8K reputationPosted Jul 23, 2014, 10:22 AM EDT
Harshal ThakreRank #9,158 · 210 reputationPosted Jul 26, 2014, 3:50 AM EDT
Guest UserRank #259 · 9.8K reputationPosted Jul 26, 2014, 6:35 AM EDT
- any error generated in logs at godaddy?
- did you put loggers in application_start etc event to see what's happening there?
- did you check with godaddy, if you can debug from your visual studio or there you can install visual studio express and debug it?
twitter @sumitjolly