Scheduled Windows Form Application or Console Application with GUI

I need to create an application that runs daily (mon-fri) as a schedule.  

I could do this as a console application but the settings for the app need to be in a friendly GUI format and there are a number of other issues that would require a GUI i.e I need to produce reports showing exceptions and processed data, also previous runs and their results in tabular form that can be sorted by clicking the header column.

You also need to be able to run a process manually if the schedule failed.

I thought of having a console application for the process and then a GUI application for the other bits.  Is there a more efficient way where all code resides in one project.

Thanks

Lee
zensolutionsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

wguerramCommented:
You could create Projects libraries, that will hold the GUI part.
0
zensolutionsAuthor Commented:
Could you elaborate on how this would work and how to actually code it please?  I am new to C# .NET.
0
keustermansCommented:
What was mwant her is that you can create multiple projects in one solution one project for the GUI one project for the Console Application.  Diong it this way will also give you the option to cahnge the GUI to asp.net with out haveing to recode the console app.

Have you thought of using windows services for scheduled tasks?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

zensolutionsAuthor Commented:
i read somewhere that for a task that needs to be run at a specific time daily that it is better to run as a scheduled task and not a windows service.  I felt that the windows service would be a good way of implementing the solution but then when I read that I started looking at the scheduled task method.  Do you have any ideas of how to do this in a windows service?
0
keustermansCommented:
It is faily simple to do this in a windows service.

You create a windows service that contains a timer that runs code every so often. then you have a config file that you use to set the time when the specific logic is suposed to be run i.e the schedule.

In the timer elapsed event you compare the current time to the time in your config file and run the logic if the time matches the scheduled time criteria. On completion you can set a flag in the registry to indicate that the scheduled task ran correctly.  

You logic should then contain code that checks the registry for the task completed flag as well.  If the flag was not set due to some issue then you can run it again.

Your logic flow should be as follows

Check if task was completed by querying the registry.
If not compare the times
if the current time is equal or bigger to the scheduled time then run the task
If the task completes without errors then set the regstry flag

it would wise to set a window in which you want the task to run.  Let say you want to run a task at 5PM then you should give it a window to run in if it does not complete the first time. Lets say the window is 2 hours.  Then the task will attempt to execute between 5PM and 7PM until it ran succesfully.

I hop this makes sense to you.
0
zensolutionsAuthor Commented:
I read a bit more about the windows service and after looking through a number of fors and against decided to go with the one solution with multiple projects.  Thanks for your time.  I may be back when I get to the next stages of deveolpment with more questions.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.