Click here to Skip to main content
11,709,536 members (49,040 online)
Rate this: bad
good
Please Sign up or sign in to vote.
Hello All,

Framework using:2010 Ultimate
.net framework:3.5
Operating system : 2008 enterprise R2

Task done: I have created a web application(.aspx); containing coding related to consumption of web services, creation of word document reports (DOCX:using openxml library)and some dotnetcharting libraries.

Research/Outcome:This application has to be called automatically every month end say : 30 of every month. now :
1) I am not sure whether I did right to create it in webapplication format?Please suggest if something better?
2) Most important, can this be done in Windows dll sort of thing( just read in help ) where it can be called be windows schedulers?
3) can we call this in webapplication format as well if yes then please assist?

As I had experience in PHP we create a webpage there and then it will be called by Cron jobs on linux and will automatically executed?

End goal:application would be called automatically at every 30 of month and then stop after doing all work.

Thanks in advance.

-Mahendra Varandani
Posted 9-Dec-12 23:41pm
Edited 10-Dec-12 3:06am
v2

1 solution

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

Solution 1

Hi

I think you could have created the solution comprising of two projects i.e.,
1. dot net library project to have the DOCX conversion code + charting code
2. Consume the library using a stand alone console application (if it is not be accessed from outside)
3. Configure the schedule jobs to run the console application at given schedules.

Regards
Pawan
  Permalink  
Comments
masdhasdh at 11-Dec-12 10:01am
   
Thanks pawan...

But I can say it is a kind of web application where admin panel is also there.. Obvious it would only accessible on a single PC ( Server) not accessible via other machine or network.

so is there any possibility that we can make a project run in a cron job as www.localhost.com/default.aspx only?

thanks again
Rai Pawan at 12-Dec-12 0:08am
   
Okay, so in case the functionality apart from being executed once every month is to be manually executed from a request from the admin panel (windows form/web form), then I think the structured approach would be to expose the functionality as web services which you have already done, now you may consume those services in your windows application i.e., the admin panel and simultaneously in the console application which will be referenced by the windows scheduler. Why I am recommending these two is because from the schedule there will be implications to run the windows forms application directly since there might be certain GUI interface that will require certain manual input and there might be other constraints too. here is a forum post on msdn about it wherein the developer had problem doing so http://social.msdn.microsoft.com/Forums/en-US/winforms/thread/6361b9fa-b956-4dce-a856-9888cb767a14#f91befd7-6f67-41ed-a82c-07e10d6ce718

Regards
Pawan
masdhasdh at 12-Dec-12 3:40am
   
thanks pawan

So let me elaborate it little bit more..
there is admin.aspx and default.aspx

admin.aspx== will have GUI which contains various setting parameter which will be done manually (nothing at cron side)

default.aspx==contain the code which has be executed every month end (NO GUI,NO MANNUAL interruption required to execute) every function and code is written on page load as soon as page will be hit the code will execute and perform the required action..

So can't we do the same cron tab as in PHP? just marking the absolute path in cron and it will execute it..???

Thanks again..
Rai Pawan at 12-Dec-12 4:02am
   
for directly executing a page from command like you can check this link http://mohammednv.wordpress.com/2008/01/08/how-to-create-scheduled-tasks-for-aspx-files/ however I'd again emphasis that you should use console application instead of default.aspx page that is to be executed in a schedule.
masdhasdh at 12-Dec-12 5:58am
   
Thanks pawan for your concern..

So is there any major change I have to do while making it console application ??

or just to copy paste my whole code in the new console application only?

May I call web services as well in console applications?

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 525
1 OriginalGriff 250
2 Peter Leow 219
3 Maciej Los 185
4 Mika Wendelius 160
0 OriginalGriff 9,428
1 Sergey Alexandrovich Kryukov 9,037
2 CPallini 5,189
3 Maciej Los 4,991
4 Mika Wendelius 3,856


Advertise | Privacy | Mobile
Web04 | 2.8.150819.1 | Last Updated 11 Dec 2012
Copyright © CodeProject, 1999-2015
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