Click here to Skip to main content
12,823,725 members (59,108 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# C#4.0 VS2010 Scheduler , +
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 10-Dec-12 0:41am
Updated 10-Dec-12 4:06am

1 solution

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

Solution 1


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.

masdhasdh 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 only?

thanks again
Rai Pawan 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

masdhasdh 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 12-Dec-12 4:02am
for directly executing a page from command like you can check this link 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 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
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170308.1 | Last Updated 11 Dec 2012
Copyright © CodeProject, 1999-2017
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