Solved

How to run an C# application as an schedule Task

Posted on 2015-02-03
4
104 Views
Last Modified: 2015-02-18
I have an C# application that is ran daily at 8:00am, where the user has to click the Run Gain Loss button on the form. I've attached a screenshot of the form. I'm looking for a solution where the application would run and the Run Gain Loss button is click automatically daily at 8:00am. I know I can setup a scheduled task to run the C# application at 8:00am but how do I execute the Run Gain Loss button? Any ideals on how I can get this application to run automatically, maybe some 3rd party software to click the Run Gain Loss button. Again, any ideals would much appeciated.

Thanks in Advance
0
Comment
Question by:gilweber3
4 Comments
 
LVL 17

Accepted Solution

by:
OriNetworks earned 500 total points
ID: 40586764
If you don't have the ability to call an API within the software then there are automation frameworks such as AutoIt https://www.autoitscript.com/site/autoit/
0
 
LVL 35

Expert Comment

by:Kimputer
ID: 40586786
Usually I use AutoHotkey for these things. Please note the caveat, the screen has to be on and logged in. Therefore, it's better to get it running without the button (will take the original developer 4 seconds of work), that way the job always runs (even when you're not logged on)
0
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 40586979
I wouldn't rely on something to click a button. What if you redesign and the button moves? It will stop working.

Instead, have the code behind the button callable from elsewhere then the button and pass a parameter to your application to run your new method.

Check http://emoreau.com/Entries/Articles/2008/11/Passing-arguments-to-an-application-startup.aspx
0
 
LVL 85

Expert Comment

by:Mike Tomlinson
ID: 40587010
Do you have the source code for this application?  That's not clear from the description.  If yes, then I'd go with Eric's suggestion and pass a parameter to the app so you 'll know to run the code associated with the button click.

Depending on what the app does, it might be possible to re-design it so all the work gets done from within program.cs without ever showing a form.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
send mail from app.net 8 28
Build JSON from table records 17 41
Why, and when, to use Windows Workflow 1 20
bulid json format 3 21
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now