Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: WCF C#4.0 SSRS
It's a asp.net 4 application. Now it works this way: there is a button and a dropdown of statementDate on a webpage. After you click the button, server side gonna pass the statementDate you choose as parameter to some function which convert ssrs to pdf (the reports also has some subreports), and attach it email to clients. Now the function works well.
 
Problem is we need let system automatically do this at second day of every month.
 
I can add timer in the global file which is not best solution?
 
Try to add wcf service to this web application, any suggestion about that?
 
Thanks a million
Posted 30-Jan-13 11:40am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

No, not a timer, of course.
 
You need some service which creates a report sends what you need. Of course, you can develop appropriate Windows Service. But Windows already provides the service designed for such things. It is already bundled with Windows and enabled; you can use it on different levels. It is called Window Task Scheduler, see http://en.wikipedia.org/wiki/Windows_Task_Scheduler[^].
 
First, you can schedule events using command-line utilities AT.EXE or CSHTASKS.EXE (which is replacing AT.EXE), see:
http://en.wikipedia.org/wiki/At_%28Windows%29[^],
http://en.wikipedia.org/wiki/Schtasks[^],
http://technet.microsoft.com/en-us/library/bb490866.aspx[^],
http://msdn.microsoft.com/en-us/library/windows/desktop/bb736357%28v=vs.85%29.aspx[^].
 
And you also can use Window Task Scheduler API, please see:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa383614%28v=vs.85%29.aspx[^],
http://msdn.microsoft.com/en-us/library/windows/desktop/aa383608%28v=vs.85%29.aspx[^].
 
To see how can you use it with .NET, see this CodeProject article: A New Task Scheduler Class Library for .NET[^].
 
—SA
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 365
1 Sergey Alexandrovich Kryukov 319
2 CPallini 275
3 DamithSL 214
4 Maciej Los 185
0 OriginalGriff 5,455
1 DamithSL 4,457
2 Maciej Los 3,885
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,115


Advertise | Privacy | Mobile
Web04 | 2.8.141216.1 | Last Updated 31 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100